Skip to content

Commit 94601d0

Browse files
tomer-wCopilot
andcommitted
Remove un-needed state from button entitites.
Co-authored-by: Copilot <copilot@github.com>
1 parent 7650d77 commit 94601d0

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

.github/scripts/merge_topics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def main():
7979
has_device_class = topic_metric_type in DEVICE_CLASS_METRIC_TYPES
8080
if topic_unit is not None and topic_unit != "%" and not has_device_class:
8181
entity_entry["unit_of_measurement"] = topic_unit
82-
if enum_name and enum_name in enum_lookup:
82+
if entity_type != "button" and enum_name and enum_name in enum_lookup:
8383
entity_entry["state"] = enum_lookup[enum_name]
8484

8585
# Add to original entity type

custom_components/victron_mqtt/translations/en.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,7 @@
318318
},
319319
"button": {
320320
"platform_device_reboot": {
321-
"name": "Device reboot",
322-
"state": {
323-
"off": "Off",
324-
"on": "On"
325-
}
321+
"name": "Device reboot"
326322
}
327323
},
328324
"device_tracker": {

0 commit comments

Comments
 (0)