openhab-scripters / openhab-helper-libraries

Scripts and modules for use with openHAB
Eclipse Public License 1.0
88 stars 69 forks source link

[Area Triggers and Actions] Allow an item to define a default "mode" #308

Closed besynnerlig closed 3 years ago

besynnerlig commented 4 years ago

In an items metadata, we can define brightness etc for each mode. If a Mode or any of the lighting keys are left out, the default values from configuration.area_triggers_and_actions_dict["default_levels"] will be used. It would make sense to allow to define a "default" or "ELSE" mode in the metadata for each item that would be used if the current Mode key is not defined. Another way to put it: "default mode key values per item" to be used (if defined) before using the system wide default values defined in configuration.area_triggers_and_actions_dict["default_levels"].

Originally suggested suggested here.

5iver commented 3 years ago

@besynnerlig, I hope you are doing well! If you are OK with it, I'm going to close this one. This change would simplify some data entry, but it also adds complexity to understanding how to configure the metadata... and also to the code.