From bf428ee027ef997f516981925a4715d3b80a3b1e Mon Sep 17 00:00:00 2001 From: Patrick Hein Date: Fri, 6 Sep 2024 20:02:31 +0200 Subject: [PATCH] Retain volatile optional pcb settings (#243) --- custom_components/aquarea/definitions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/custom_components/aquarea/definitions.py b/custom_components/aquarea/definitions.py index 8dc1008..73ce317 100644 --- a/custom_components/aquarea/definitions.py +++ b/custom_components/aquarea/definitions.py @@ -647,8 +647,9 @@ def build_numbers(mqtt_prefix: str) -> list[HeishaMonNumberEntityDescription]: ), HeishaMonNumberEntityDescription( heishamon_topic_id="SetDemandControl", - key=f"{mqtt_prefix}main/FakeDemandControl", # FIXME: find how to get real value + key=f"{mqtt_prefix}commands/SetDemandControl", command_topic=f"{mqtt_prefix}commands/SetDemandControl", + retain=True, name="Demand Control", entity_category=EntityCategory.CONFIG, native_unit_of_measurement="%", @@ -782,8 +783,9 @@ def build_selects(mqtt_prefix: str) -> list[HeishaMonSelectEntityDescription]: ), HeishaMonSelectEntityDescription( heishamon_topic_id="SetSmartGridMode", - key=f"{mqtt_prefix}main/FakeSmartGridMode", # FIXME: find how to get real value + key=f"{mqtt_prefix}commands/SetSmartGridMode", command_topic=f"{mqtt_prefix}commands/SetSmartGridMode", + retain=True, name="Smart Grid Mode", entity_category=EntityCategory.CONFIG, state=read_smart_grid_mode,