(hacs)
Add sensor.
Add sensor.
Add sensor .
def add_sensor(hacs):
    """Add sensor."""
    if hacs.configuration.config_type == "yaml":
        hacs.hass.async_create_task(
            discovery.async_load_platform(
                hacs.hass, "sensor", const.DOMAIN, {}, hacs.configuration.config
            )
        )
    else:
        hacs.hass.async_add_job(
            hacs.hass.config_entries.async_forward_entry_setup(
                hacs.configuration.config_entry, "sensor"
            )
        )
def add_sensor ( hacs ) : if hacs . configuration . config_type == "yaml" : hacs . hass . async_create_task ( discovery . async_load_platform ( hacs . hass , "sensor" , const . DOMAIN , { } , hacs . configuration . config ) ) else : hacs . hass . async_add_job ( hacs . hass . config_entries . async_forward_entry_setup ( hacs . configuration . config_entry , "sensor" ) )