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:
Erik Montnemery
2023-12-10 23:16:06 +01:00
committed by GitHub
parent 4752d37df7
commit b5af987a18
11 changed files with 313 additions and 4 deletions

View File

@@ -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: