Bump hatasmota to 0.0.32 (#43360)

This commit is contained in:
Erik Montnemery
2020-11-19 17:13:42 +00:00
committed by Paulus Schoutsen
parent 59d6eaf856
commit 18fdf3a429
4 changed files with 22 additions and 3 deletions
@@ -22,6 +22,25 @@ async def test_subscribing_config_topic(hass, mqtt_mock, setup_tasmota):
assert call_args[2] == 0
async def test_future_discovery_message(hass, mqtt_mock, caplog):
"""Test we handle backwards compatible discovery messages."""
config = copy.deepcopy(DEFAULT_CONFIG)
config["future_option"] = "BEST_SINCE_SLICED_BREAD"
config["so"]["another_future_option"] = "EVEN_BETTER"
with patch(
"homeassistant.components.tasmota.discovery.tasmota_get_device_config",
return_value={},
) as mock_tasmota_get_device_config:
await setup_tasmota_helper(hass)
async_fire_mqtt_message(
hass, f"{DEFAULT_PREFIX}/00000049A3BC/config", json.dumps(config)
)
await hass.async_block_till_done()
assert mock_tasmota_get_device_config.called
async def test_valid_discovery_message(hass, mqtt_mock, caplog):
"""Test discovery callback called."""
config = copy.deepcopy(DEFAULT_CONFIG)