I'm struggling a bit with the Parameters as exposed by the plugin framework. According to documentation, you have a standard set (like address, port, user/pwd etc) plus 6 user defined (mode1..mode6). However, when you make something completely user defined, it is nicely displayed in the HW page, but cannot be accessed from the code. For example, adding this to the plugin definition:
Code: Select all
<param field="Scene1" label="Temp Away " width="50px" required="true" default="17.0" >
<description><br/>==== Scene configuration ====</description>
</param>
<param field="Scene2" label="Temp Sleep " width="50px" required="true" default="18.0" />
<param field="Scene3" label="Temp Home " width="50px" required="true" default="19.5" />
<param field="Scene4" label="Temp Comfort " width="50px" required="true" default="20.0" />
Code: Select all
2023-01-02 22:00:46.941 Error: Toon: if strCurrentTemp == Parameters["Scene1"]:
2023-01-02 22:00:46.941 Error: Toon: KeyError: 'Scene1'
In practice, a lot of plugins already have 2 Parameters:
- a refersh rate
- a debug logging selector