Search in sources :

Example 1 with StandardProfile

use of org.openhab.binding.enocean.internal.profiles.StandardProfile in project openhab1-addons by openhab.

the class EnoceanBinding method valueChanged.

@Override
public void valueChanged(ParameterAddress parameterAddress, Value valueObject) {
    logger.debug("Received new value {} for device at {}", valueObject, parameterAddress);
    Profile profile = null;
    if (profiles.containsKey(parameterAddress.getAsString())) {
        profile = profiles.get(parameterAddress.getAsString());
    } else if (profiles.containsKey(parameterAddress.getChannelAsString())) {
        profile = profiles.get(parameterAddress.getChannelAsString());
    } else if (profiles.containsKey(parameterAddress.getDeviceAsString())) {
        profile = profiles.get(parameterAddress.getDeviceAsString());
    } else {
        Item item = getItemForParameter(parameterAddress);
        profile = new StandardProfile(item, eventPublisher);
        addProfile(item, parameterAddress, profile);
    }
    profile.valueChanged(parameterAddress, valueObject);
}
Also used : DimmerItem(org.openhab.core.library.items.DimmerItem) SwitchItem(org.openhab.core.library.items.SwitchItem) RollershutterItem(org.openhab.core.library.items.RollershutterItem) Item(org.openhab.core.items.Item) StringItem(org.openhab.core.library.items.StringItem) StandardProfile(org.openhab.binding.enocean.internal.profiles.StandardProfile) Profile(org.openhab.binding.enocean.internal.profiles.Profile) SwitchOnOffProfile(org.openhab.binding.enocean.internal.profiles.SwitchOnOffProfile) StandardProfile(org.openhab.binding.enocean.internal.profiles.StandardProfile) DimmerOnOffProfile(org.openhab.binding.enocean.internal.profiles.DimmerOnOffProfile) WindowHandleProfile(org.openhab.binding.enocean.internal.profiles.WindowHandleProfile) RollershutterProfile(org.openhab.binding.enocean.internal.profiles.RollershutterProfile)

Aggregations

DimmerOnOffProfile (org.openhab.binding.enocean.internal.profiles.DimmerOnOffProfile)1 Profile (org.openhab.binding.enocean.internal.profiles.Profile)1 RollershutterProfile (org.openhab.binding.enocean.internal.profiles.RollershutterProfile)1 StandardProfile (org.openhab.binding.enocean.internal.profiles.StandardProfile)1 SwitchOnOffProfile (org.openhab.binding.enocean.internal.profiles.SwitchOnOffProfile)1 WindowHandleProfile (org.openhab.binding.enocean.internal.profiles.WindowHandleProfile)1 Item (org.openhab.core.items.Item)1 DimmerItem (org.openhab.core.library.items.DimmerItem)1 RollershutterItem (org.openhab.core.library.items.RollershutterItem)1 StringItem (org.openhab.core.library.items.StringItem)1 SwitchItem (org.openhab.core.library.items.SwitchItem)1