original_docstring: Set up the HomematicIP Cloud lights from a config entry.
docstring: Set up the HomematicIP Cloud lights from a config entry.
docstring_tokens: Set up the HomematicIP Cloud lights from a config entry .
code: async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry,
                              async_add_entities) -> None:
      """Set up the HomematicIP Cloud lights from a config entry."""
      home = hass.data[HMIPC_DOMAIN][config_entry.data[HMIPC_HAPID]].home
      devices = []
      for device in home.devices:
          if isinstance(device, AsyncBrandSwitchMeasuring):
              devices.append(HomematicipLightMeasuring(home, device))
          elif isinstance(device, AsyncBrandSwitchNotificationLight):
              devices.append(HomematicipLight(home, device))
              devices.append(HomematicipNotificationLight(
                  home, device, device.topLightChannelIndex))
              devices.append(HomematicipNotificationLight(
                  home, device, device.bottomLightChannelIndex))
          elif isinstance(device,
                          (AsyncDimmer, AsyncPluggableDimmer,
                           AsyncBrandDimmer, AsyncFullFlushDimmer)):
              devices.append(HomematicipDimmer(home, device))
  
      if devices:
          async_add_entities(devices)
code_tokens: async def async_setup_entry ( hass : HomeAssistant , config_entry : ConfigEntry , async_add_entities ) -> None : home = hass . data [ HMIPC_DOMAIN ] [ config_entry . data [ HMIPC_HAPID ] ] . home devices = [ ] for device in home . devices : if isinstance ( device , AsyncBrandSwitchMeasuring ) : devices . append ( HomematicipLightMeasuring ( home , device ) ) elif isinstance ( device , AsyncBrandSwitchNotificationLight ) : devices . append ( HomematicipLight ( home , device ) ) devices . append ( HomematicipNotificationLight ( home , device , device . topLightChannelIndex ) ) devices . append ( HomematicipNotificationLight ( home , device , device . bottomLightChannelIndex ) ) elif isinstance ( device , ( AsyncDimmer , AsyncPluggableDimmer , AsyncBrandDimmer , AsyncFullFlushDimmer ) ) : devices . append ( HomematicipDimmer ( home , device ) ) if devices : async_add_entities ( devices )
short_docstring: Set up the HomematicIP Cloud lights from a config entry.
short_docstring_tokens: Set up the HomematicIP Cloud lights from a config entry .
comment: """Set up the HomematicIP Cloud lights from a config entry."""