Add MQTT button as entity platform on MQTT subentries (#144204)

This commit is contained in:
Jan Bouwhuis
2025-05-06 13:57:27 +02:00
committed by GitHub
parent deaaf2f082
commit d0ed8b67c4
6 changed files with 100 additions and 3 deletions

View File

@@ -80,6 +80,18 @@ MOCK_SUBENTRY_BINARY_SENSOR_COMPONENT = {
"entity_picture": "https://example.com/5b06357ef8654e8d9c54cee5bb0e939b",
},
}
MOCK_SUBENTRY_BUTTON_COMPONENT = {
"365d05e6607c4dfb8ae915cff71a954b": {
"platform": "button",
"name": "Restart",
"device_class": "restart",
"command_topic": "test-topic",
"payload_press": "PRESS",
"command_template": "{{ value }}",
"retain": False,
"entity_picture": "https://example.com/365d05e6607c4dfb8ae915cff71a954b",
},
}
MOCK_SUBENTRY_NOTIFY_COMPONENT1 = {
"363a7ecad6be4a19b939a016ea93e994": {
"platform": "notify",
@@ -205,6 +217,10 @@ MOCK_BINARY_SENSOR_SUBENTRY_DATA_SINGLE = {
"device": MOCK_SUBENTRY_DEVICE_DATA | {"mqtt_settings": {"qos": 2}},
"components": MOCK_SUBENTRY_BINARY_SENSOR_COMPONENT,
}
MOCK_BUTTON_SUBENTRY_DATA_SINGLE = {
"device": MOCK_SUBENTRY_DEVICE_DATA | {"mqtt_settings": {"qos": 2}},
"components": MOCK_SUBENTRY_BUTTON_COMPONENT,
}
MOCK_NOTIFY_SUBENTRY_DATA_SINGLE = {
"device": MOCK_SUBENTRY_DEVICE_DATA | {"mqtt_settings": {"qos": 1}},
"components": MOCK_SUBENTRY_NOTIFY_COMPONENT1,