mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Add subentry support for MQTT siren device (#154220)
This commit is contained in:
@@ -565,6 +565,25 @@ MOCK_SUBENTRY_SENSOR_COMPONENT_LAST_RESET = {
|
||||
"entity_picture": "https://example.com/e9261f6feed443e7b7d5f3fbe2a47412",
|
||||
},
|
||||
}
|
||||
MOCK_SUBENTRY_SIREN_COMPONENT = {
|
||||
"3faf1318023c46c5aea26707eeb6f12e": {
|
||||
"platform": "siren",
|
||||
"name": "Siren",
|
||||
"entity_category": None,
|
||||
"command_topic": "test-topic",
|
||||
"state_topic": "test-topic",
|
||||
"command_template": "{{ value }}",
|
||||
"command_off_template": "{{ value }}",
|
||||
"value_template": "{{ value_json.value }}",
|
||||
"payload_off": "OFF",
|
||||
"payload_on": "ON",
|
||||
"available_tones": ["Happy hour", "Cooling alarm"],
|
||||
"support_volume_set": True,
|
||||
"support_duration": True,
|
||||
"entity_picture": "https://example.com/3faf1318023c46c5aea26707eeb6f12e",
|
||||
"optimistic": True,
|
||||
},
|
||||
}
|
||||
MOCK_SUBENTRY_SWITCH_COMPONENT = {
|
||||
"3faf1318016c46c5aea26707eeb6f12e": {
|
||||
"platform": "switch",
|
||||
@@ -698,6 +717,10 @@ MOCK_SENSOR_SUBENTRY_DATA_LAST_RESET_TEMPLATE = {
|
||||
"device": MOCK_SUBENTRY_DEVICE_DATA | {"mqtt_settings": {"qos": 0}},
|
||||
"components": MOCK_SUBENTRY_SENSOR_COMPONENT_LAST_RESET,
|
||||
}
|
||||
MOCK_SIREN_SUBENTRY_DATA = {
|
||||
"device": MOCK_SUBENTRY_DEVICE_DATA | {"mqtt_settings": {"qos": 0}},
|
||||
"components": MOCK_SUBENTRY_SIREN_COMPONENT,
|
||||
}
|
||||
MOCK_SWITCH_SUBENTRY_DATA = {
|
||||
"device": MOCK_SUBENTRY_DEVICE_DATA | {"mqtt_settings": {"qos": 0}},
|
||||
"components": MOCK_SUBENTRY_SWITCH_COMPONENT,
|
||||
|
||||
Reference in New Issue
Block a user