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:
parent
a0e9772f52
commit
164d0d2085
11 changed files with 313 additions and 4 deletions
|
@ -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,
|
||||
|
@ -663,6 +665,27 @@ 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["dn"] = "Test"
|
||||
config["rl"][0] = 3
|
||||
config["rl"][1] = 3
|
||||
await help_test_deep_sleep_availability_when_connection_lost(
|
||||
hass,
|
||||
mqtt_client_mock,
|
||||
mqtt_mock,
|
||||
Platform.COVER,
|
||||
config,
|
||||
object_id="test_cover_1",
|
||||
)
|
||||
|
||||
|
||||
async def test_availability(
|
||||
hass: HomeAssistant, mqtt_mock: MqttMockHAClient, setup_tasmota
|
||||
) -> None:
|
||||
|
@ -676,6 +699,19 @@ async def test_availability(
|
|||
)
|
||||
|
||||
|
||||
async def test_deep_sleep_availability(
|
||||
hass: HomeAssistant, mqtt_mock: MqttMockHAClient, setup_tasmota
|
||||
) -> None:
|
||||
"""Test availability."""
|
||||
config = copy.deepcopy(DEFAULT_CONFIG)
|
||||
config["dn"] = "Test"
|
||||
config["rl"][0] = 3
|
||||
config["rl"][1] = 3
|
||||
await help_test_deep_sleep_availability(
|
||||
hass, mqtt_mock, Platform.COVER, config, object_id="test_cover_1"
|
||||
)
|
||||
|
||||
|
||||
async def test_availability_discovery_update(
|
||||
hass: HomeAssistant, mqtt_mock: MqttMockHAClient, setup_tasmota
|
||||
) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue