mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Use async call
This commit is contained in:
parent
24fd5b6d1c
commit
4fe9ffbfac
@ -128,7 +128,7 @@ async def async_setup_platform(
|
|||||||
|
|
||||||
await mqtt.async_subscribe(hass, TOPIC, async_sensor_event_received, 0)
|
await mqtt.async_subscribe(hass, TOPIC, async_sensor_event_received, 0)
|
||||||
|
|
||||||
hass.create_task(_async_setup_mqtt(), "arwn setup")
|
hass.async_create_task(_async_setup_mqtt(), "arwn setup")
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_sensor_event_received(msg: mqtt.ReceiveMessage) -> None:
|
def async_sensor_event_received(msg: mqtt.ReceiveMessage) -> None:
|
||||||
|
@ -230,7 +230,7 @@ async def async_setup_platform(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
hass.create_task(_async_setup_entities(), "manual_mqtt setup")
|
hass.async_create_task(_async_setup_entities(), "manual_mqtt setup")
|
||||||
|
|
||||||
|
|
||||||
class ManualMQTTAlarm(AlarmControlPanelEntity):
|
class ManualMQTTAlarm(AlarmControlPanelEntity):
|
||||||
|
@ -59,7 +59,7 @@ async def async_setup_scanner(
|
|||||||
|
|
||||||
await _async_setup_scanner(hass, config, async_see)
|
await _async_setup_scanner(hass, config, async_see)
|
||||||
|
|
||||||
hass.create_task(_async_wait_for_mqtt_and_set_up(), "mqtt_json setup")
|
hass.async_create_task(_async_wait_for_mqtt_and_set_up(), "mqtt_json setup")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ async def async_setup_platform(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
hass.create_task(_async_setup_entities(), "mqtt_room setup")
|
hass.async_create_task(_async_setup_entities(), "mqtt_room setup")
|
||||||
|
|
||||||
|
|
||||||
class MQTTRoomSensor(SensorEntity):
|
class MQTTRoomSensor(SensorEntity):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user