mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 19:25:12 +02:00
Bump hatasmota to 0.8.0 (#105440)
* Bump hatasmota to 0.8.0 * Keep devices with deep sleep support always available * Add tests
This commit is contained in:
@@ -22,6 +22,8 @@ from .test_common import (
|
||||
help_test_availability_discovery_update,
|
||||
help_test_availability_poll_state,
|
||||
help_test_availability_when_connection_lost,
|
||||
help_test_deep_sleep_availability,
|
||||
help_test_deep_sleep_availability_when_connection_lost,
|
||||
help_test_discovery_device_remove,
|
||||
help_test_discovery_removal,
|
||||
help_test_discovery_update_unchanged,
|
||||
@@ -1669,6 +1671,21 @@ async def test_availability_when_connection_lost(
|
||||
)
|
||||
|
||||
|
||||
async def test_deep_sleep_availability_when_connection_lost(
|
||||
hass: HomeAssistant,
|
||||
mqtt_client_mock: MqttMockPahoClient,
|
||||
mqtt_mock: MqttMockHAClient,
|
||||
setup_tasmota,
|
||||
) -> None:
|
||||
"""Test availability after MQTT disconnection."""
|
||||
config = copy.deepcopy(DEFAULT_CONFIG)
|
||||
config["rl"][0] = 2
|
||||
config["lt_st"] = 1 # 1 channel light (Dimmer)
|
||||
await help_test_deep_sleep_availability_when_connection_lost(
|
||||
hass, mqtt_client_mock, mqtt_mock, Platform.LIGHT, config
|
||||
)
|
||||
|
||||
|
||||
async def test_availability(
|
||||
hass: HomeAssistant, mqtt_mock: MqttMockHAClient, setup_tasmota
|
||||
) -> None:
|
||||
@@ -1679,6 +1696,16 @@ async def test_availability(
|
||||
await help_test_availability(hass, mqtt_mock, Platform.LIGHT, config)
|
||||
|
||||
|
||||
async def test_deep_sleep_availability(
|
||||
hass: HomeAssistant, mqtt_mock: MqttMockHAClient, setup_tasmota
|
||||
) -> None:
|
||||
"""Test availability."""
|
||||
config = copy.deepcopy(DEFAULT_CONFIG)
|
||||
config["rl"][0] = 2
|
||||
config["lt_st"] = 1 # 1 channel light (Dimmer)
|
||||
await help_test_deep_sleep_availability(hass, mqtt_mock, Platform.LIGHT, config)
|
||||
|
||||
|
||||
async def test_availability_discovery_update(
|
||||
hass: HomeAssistant, mqtt_mock: MqttMockHAClient, setup_tasmota
|
||||
) -> None:
|
||||
|
Reference in New Issue
Block a user