mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Reconfigure MQTT binary_sensor component if discovery info is changed (#18169)
* Recreate component if discovery info is changed * Update component instead of remove+add * Set name and unique_id in __init__ * Update unit test * Cleanup * More cleanup * Refactor according to review comments * Change discovery_hash * Review comments, add tests * Fix handling of value_template
This commit is contained in:
committed by
Paulus Schoutsen
parent
01953ab46b
commit
de9bac9ee3
@@ -295,6 +295,7 @@ def async_mock_mqtt_component(hass, config=None):
|
||||
with patch('paho.mqtt.client.Client') as mock_client:
|
||||
mock_client().connect.return_value = 0
|
||||
mock_client().subscribe.return_value = (0, 0)
|
||||
mock_client().unsubscribe.return_value = (0, 0)
|
||||
mock_client().publish.return_value = (0, 0)
|
||||
|
||||
result = yield from async_setup_component(hass, mqtt.DOMAIN, {
|
||||
|
||||
Reference in New Issue
Block a user