Search in sources :

Example 1 with GenericItem

use of org.openhab.core.items.GenericItem in project openhab1-addons by openhab.

the class Enigma2Binding method postUpdate.

private void postUpdate(Enigma2BindingProvider provider, Item item, final String value) {
    Class<? extends Item> itemType = provider.getItemType(item.getName());
    State state = createState(itemType, value);
    if (state != null) {
        if (item instanceof GenericItem) {
            ((GenericItem) item).setState(state);
        }
        eventPublisher.postUpdate(item.getName(), state);
    }
}
Also used : GenericItem(org.openhab.core.items.GenericItem) State(org.openhab.core.types.State)

Aggregations

GenericItem (org.openhab.core.items.GenericItem)1 State (org.openhab.core.types.State)1