custom_components/nea_sg_weather/weather.py
async def async_setup_platform(
    hass: HomeAssistant,
    config: ConfigType,
    async_add_entities: AddEntitiesCallback,
    discovery_info: DiscoveryInfoType | None = None,
) -> None:
    """Set up the NEA Singapore Weather weather entity from YAML (OLD)"""
    _LOGGER.warning("Loading NEA Weather via platform config is deprecated")
    config = {CONF_SELECTOR: "WEATHER", **config}

    hass.async_create_task(
        hass.config_entries.flow.async_init(
            DOMAIN, context={"source": SOURCE_IMPORT}, data=config
        )
    )
Set up the NEA Singapore Weather weather entity from YAML (OLD)
Set up the NEA Singapore Weather weather entity from YAML (OLD)
Set up the NEA Singapore Weather weather entity from YAML ( OLD )
async def async_setup_platform(
    hass: HomeAssistant,
    config: ConfigType,
    async_add_entities: AddEntitiesCallback,
    discovery_info: DiscoveryInfoType | None = None,
) -> None:
    _LOGGER.warning("Loading NEA Weather via platform config is deprecated")
    config = {CONF_SELECTOR: "WEATHER", **config}
    hass.async_create_task(
        hass.config_entries.flow.async_init(
            DOMAIN, context={"source": SOURCE_IMPORT}, data=config
        )
    )
async def async_setup_platform ( hass : HomeAssistant , config : ConfigType , async_add_entities : AddEntitiesCallback , discovery_info : DiscoveryInfoType | None = None , ) -> None : _LOGGER . warning ( "Loading NEA Weather via platform config is deprecated" ) config = { CONF_SELECTOR : "WEATHER" , ** config } hass . async_create_task ( hass . config_entries . flow . async_init ( DOMAIN , context = { "source" : SOURCE_IMPORT } , data = config ) )
Set up the NEA Singapore Weather weather entity from YAML (OLD)
Set up the NEA Singapore Weather weather entity from YAML ( OLD )
"""Set up the NEA Singapore Weather weather entity from YAML (OLD)"""
hass
HomeAssistant
config
ConfigType
async_add_entities
AddEntitiesCallback
discovery_info
DiscoveryInfoType | None