Adding CONSTANTS to the fhem.cfg

Begonnen von jacko, 10 Februar 2023, 11:33:48

Vorheriges Thema - Nächstes Thema


In a FHEM installation I want to set a target temperature, achieved by controlling a heater and fan. I currently set this up explicitly in the depths of the fhem.cfg file. I would really like to be able to do this once at the start of the cfg file (using something like #DEFINE TARGET_TEMP 22) AND/OR, preferably, via an object (like a slider or up/down button) on the web page.

I don't know how to do this. Can anyone point me in the right direction?


Use the readings of a device.

Create a dummy, and specify readingList and setList attributes. You can specify the widget by the latter.
When the value is changed, you can react to the event via notify/DOIF/etc, and there are perl functions for reading and setting the value, if you need to evaluate it on different occasions.