original_docstring: Return a set of broadcast addresses.
docstring: Return a set of broadcast addresses.
docstring_tokens: Return a set of broadcast addresses .
code: async def async_get_ipv4_broadcast_addresses(hass: HomeAssistant) -> set[IPv4Address]:
      """Return a set of broadcast addresses."""
      broadcast_addresses: set[IPv4Address] = {IPv4Address(IPV4_BROADCAST_ADDR)}
      adapters = await async_get_adapters(hass)
      if async_only_default_interface_enabled(adapters):
          return broadcast_addresses
      for adapter in adapters:
          if not adapter["enabled"]:
              continue
          for ip_info in adapter["ipv4"]:
              interface = ip_interface(
                  f"{ip_info['address']}/{ip_info['network_prefix']}"
              )
              broadcast_addresses.add(
                  IPv4Address(interface.network.broadcast_address.exploded)
              )
      return broadcast_addresses
code_tokens: async def async_get_ipv4_broadcast_addresses ( hass : HomeAssistant ) -> set [ IPv4Address ] : broadcast_addresses : set [ IPv4Address ] = { IPv4Address ( IPV4_BROADCAST_ADDR ) } adapters = await async_get_adapters ( hass ) if async_only_default_interface_enabled ( adapters ) : return broadcast_addresses for adapter in adapters : if not adapter [ "enabled" ] : continue for ip_info in adapter [ "ipv4" ] : interface = ip_interface ( f"{ip_info['address']}/{ip_info['network_prefix']}" ) broadcast_addresses . add ( IPv4Address ( interface . network . broadcast_address . exploded ) ) return broadcast_addresses
short_docstring: Return a set of broadcast addresses.
short_docstring_tokens: Return a set of broadcast addresses .
comment: """Return a set of broadcast addresses."""