Page 1 of 1

Unclickable (display only) selectors/switches: how?

Posted: Sunday 15 September 2024 12:30
by dheering
Hi,

Since we got our all-electric heatpump last May, I've been playing around with ESPAltherma, MQTT, Node-Red and Domoticz to get a nice dashboard of what's going on with the heatpump. This was a somewhat frustrating process, but in the end I'm quite happy with the result I got.

https://1drv.ms/i/s!AjDJn0yCBrUYhPN-9ai ... w?e=YGqOb6

However, one thing that's a bit awkward is the default behaviour of the (selector) switches that change state when you click on them. I would like these switches to behave in a 'display only' fashion. For instance, I use a selector switch to display the indoor unit operation mode (which can be DHW, Heating or DHW+Heating). But a click on one of the selectors should not do anything.

Is this possible somehow?

Best regards,
Donald.

Re: Unclickable (display only) selectors/switches: how?

Posted: Sunday 15 September 2024 18:37
by waltervl
Then you should prevent Node Red to relay the command to the device. There is no other way to have a selector switch be read only.

Re: Unclickable (display only) selectors/switches: how?

Posted: Sunday 15 September 2024 21:22
by FlyingDomotic
Did you try ticking "Protected" on device page? If my memory good serves me, you should give a password to change them, so no way to modify something without password. Even if this is not really what you want.

Re: Unclickable (display only) selectors/switches: how?

Posted: Monday 16 September 2024 16:59
by dheering
waltervl wrote: Sunday 15 September 2024 18:37 Then you should prevent Node Red to relay the command to the device. There is no other way to have a selector switch be read only.
Thanks. There's nothing to prevent, no actions are configured. And yes, that's what I was afraid of: that there's no way to have switches behave in a 'display only' mode...

Re: Unclickable (display only) selectors/switches: how?

Posted: Monday 16 September 2024 17:07
by dheering
FlyingDomotic wrote: Sunday 15 September 2024 21:22 Did you try ticking "Protected" on device page? If my memory good serves me, you should give a password to change them, so no way to modify something without password. Even if this is not really what you want.
Thanks! Yep, tried that. Maybe I should just stick with that. At least it prevents cluttering the on/off history/graphs of the switches.

Re: Unclickable (display only) selectors/switches: how?

Posted: Monday 16 September 2024 18:21
by FlyingDomotic
If you're using Mqtt, you may also have a look at MqttMapper, where you can manage set.

Re: Unclickable (display only) selectors/switches: how?

Posted: Tuesday 17 September 2024 7:39
by zicht
Hi

You could make a dummy switch to mimic the status but that does nothing when clicked, with auto correct by dzevents or lua.
Then hide the actual switch from the gui in the $hidden room.
That way only the dummy is visible and shows the status of the actual switch (without any action when clicked)
As the actual switch is not altered the logs and you dont have the password popup

Good luck in finding the optimal solution for your case.

Re: Unclickable (display only) selectors/switches: how?

Posted: Tuesday 17 September 2024 10:34
by FlyingDomotic
zicht wrote: Tuesday 17 September 2024 7:39 You could make a dummy switch to mimic the status but that does nothing when clicked, with auto correct by dzevents or lua.
In this particular case (we don't want state changes when switch clicked), dummy switch won't fit as it links state and clicks (while most of other switches don't change state when clicked, but wait for a feedback from device).

However, we can keep your idea, and have a small script that will copy original switch state to dummy, when original state changes or dummy device changes. To avoid an infinite loop, original switch state will be set to dummy only when different of current dummy state.

Re: Unclickable (display only) selectors/switches: how?

Posted: Wednesday 18 September 2024 17:10
by zicht
FlyingDomotic wrote: Tuesday 17 September 2024 10:34 However, we can keep your idea, and have a small script that will copy original switch state to dummy, when original state changes or dummy device changes. To avoid an infinite loop, original switch state will be set to dummy only when different of current dummy state.
Exactly !