HABApp.util
The util package contains useful classes which make rule creation easier.
This function is very useful together with the all possible functions of ~HABApp.util.multimode.ValueMode
for the ~HABApp.util.multimode.MultiModeItem
. For example it can be used to automatically disable or calculate the new value of the ~HABApp.util.multimode.ValueMode
It behaves like the standard python function except that it will ignore None
values which are sometimes set as the item state.
HABApp.util.functions.min
This function is very useful together with the all possible functions of ~HABApp.util.multimode.ValueMode
for the ~HABApp.util.multimode.MultiModeItem
. For example it can be used to automatically disable or calculate the new value of the ~HABApp.util.multimode.ValueMode
It behaves like the standard python function except that it will ignore None
values which are sometimes set as the item state.
HABApp.util.functions.max
Converts a rgb value to hsb color space
HABApp.util.functions.rgb_to_hsb
Converts a hsb value to the rgb color space
HABApp.util.functions.hsb_to_rgb
Statistics
Fade is a helper class which allows to easily fade a value up or down.
This example shows how to fade a Dimmer from 0 to 100 in 30 secs
This example shows how to fade three values together (e.g. for an RGB strip)
Fade
EventListenerGroup is a helper class which allows to subscribe to multiple items at once. All subscriptions can be canceled together, too. This is useful if e.g. something has to be done once after a sensor reports a value.
This is a rule which will turn on the lights once (!) in a room on the first movement in the morning. The lights will only turn on after 4 and before 8 and two movement sensors are used to pick up movement.
EventListenerGroup
Prioritizer item which automatically switches between values with different priorities. Very useful when different states or modes overlap, e.g. automatic and manual mode. etc.
The SwitchItemMode is same as ValueMode but enabled/disabled of the mode is controlled by a openHAB ~HABApp.openhab.items.SwitchItem
. This is very useful if the mode shall be deactivated from the openHAB sitemaps.
HABApp.util.multimode.MultiModeItem
HABApp.util.multimode.ValueMode
HABApp.util.multimode.SwitchItemValueMode