Skip to content

Latest commit

 

History

History
211 lines (141 loc) · 5.22 KB

interface_habapp.rst

File metadata and controls

211 lines (141 loc) · 5.22 KB

HABApp

This page describes the HABApp internals

Datatypes

HABApp provides some datatypes that simplify e.g. the color handling.

RGB

Datatype for RGB (red, green, blue) color handling. RGB types can be sent directly to openHAB and will be converted accordingly. Additionally there are wider RGB types (e.g. RGB16, RGB32) available.

HABApp.core.types.RGB

HSB

Datatype for HSB (hue, saturation, brightness) color handling. HSB types can be sent directly to openHAB and will be converted accordingly.

HABApp.core.types.HSB

Items

Item

HABApp.core.items.Item

HABApp.core.items.Item

ColorItem

HABApp.core.items.ColorItem

HABApp.core.items.ColorItem

AggregationItem

The aggregation item is an item which takes the values of another item in a time period as an input. It then allows to process these values and generate an aggregated output based on it. The item makes implementing time logic like "Has it been dark for the last hour?" or "Was there frost during the last six hours?" really easy. And since it is just like a normal item triggering on changes etc. is possible, too.

The value of my_agg in the example will now always be the maximum of MyInputItem in the last two hours. It will automatically update and always reflect the latest changes of MyInputItem.

HABApp.core.items.AggregationItem

HABApp.core.items.AggregationItem

BaseValueItem

Base class for items with values. All items that have a value must inherit from ~HABApp.core.items.BaseValueItem May not be instantiated directly.

HABApp.core.items.BaseValueItem

HABApp.core.items.BaseValueItem

Events

ValueUpdateEvent

This event gets emitted every time a value of an item receives an update

HABApp.core.events.ValueUpdateEvent

HABApp.core.events.ValueUpdateEvent

ValueChangeEvent

This event gets emitted every time a value of an item changes

HABApp.core.events.ValueChangeEvent

HABApp.core.events.ValueChangeEvent

ItemNoUpdateEvent

This event gets emitted when an item is watched for updates and no update has been made in a certain amount of time.

HABApp.core.events.ItemNoUpdateEvent

HABApp.core.events.ItemNoUpdateEvent

ItemNoChangeEvent

This event gets emitted when an item is watched for changes and no change has been made in a certain amount of time.

HABApp.core.events.ItemNoChangeEvent

HABApp.core.events.ItemNoChangeEvent