Move manual configuration of MQTT siren to the integration key (#72278)

Add siren
This commit is contained in:
Jan Bouwhuis
2022-05-23 08:08:08 +02:00
committed by GitHub
parent 623abb1147
commit c4893f96f6
3 changed files with 38 additions and 4 deletions

View File

@ -42,6 +42,7 @@ from .test_common import (
help_test_setting_attribute_via_mqtt_json_message,
help_test_setting_attribute_with_template,
help_test_setting_blocked_attribute_via_mqtt_json_message,
help_test_setup_manual_entity_from_yaml,
help_test_unique_id,
help_test_update_with_json_attrs_bad_JSON,
help_test_update_with_json_attrs_not_dict,
@ -895,3 +896,15 @@ async def test_encoding_subscribable_topics(
attribute,
attribute_value,
)
async def test_setup_manual_entity_from_yaml(hass, caplog, tmp_path):
"""Test setup manual configured MQTT entity."""
platform = siren.DOMAIN
config = copy.deepcopy(DEFAULT_CONFIG[platform])
config["name"] = "test"
del config["platform"]
await help_test_setup_manual_entity_from_yaml(
hass, caplog, tmp_path, platform, config
)
assert hass.states.get(f"{platform}.test") is not None