Poll state when Tasmota device becomes available (#41401)
This commit is contained in:
1 parent
b51a160cce
commit
35287828bc
6 files changed
+163
-4
No files matched your search
@@ -10,6 +10,7 @@ from .test_common import (
|
||||
DEFAULT_CONFIG,
|
||||
help_test_availability,
|
||||
help_test_availability_discovery_update,
|
||||
help_test_availability_poll_state,
|
||||
help_test_availability_when_connection_lost,
|
||||
help_test_discovery_device_remove,
|
||||
help_test_discovery_removal,
|
||||
@@ -124,6 +125,18 @@ async def test_availability_discovery_update(hass, mqtt_mock, setup_tasmota):
|
||||
)
|
||||
|
||||
|
||||
async def test_availability_poll_state(
|
||||
hass, mqtt_client_mock, mqtt_mock, setup_tasmota
|
||||
):
|
||||
"""Test polling after MQTT connection (re)established."""
|
||||
config = copy.deepcopy(DEFAULT_CONFIG)
|
||||
config["rl"][0] = 1
|
||||
poll_topic = "tasmota_49A3BC/cmnd/STATE"
|
||||
await help_test_availability_poll_state(
|
||||
hass, mqtt_client_mock, mqtt_mock, switch.DOMAIN, config, poll_topic, ""
|
||||
)
|
||||
|
||||
|
||||
async def test_discovery_removal_switch(hass, mqtt_mock, caplog, setup_tasmota):
|
||||
"""Test removal of discovered switch."""
|
||||
config1 = copy.deepcopy(DEFAULT_CONFIG)
|
||||
|
||||
Reference in new issue
Block a user