diff --git a/bundles/org.openhab.binding.amazonechocontrol/README.md b/bundles/org.openhab.binding.amazonechocontrol/README.md index 623eca511baa6..8411cd291c0c1 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/README.md +++ b/bundles/org.openhab.binding.amazonechocontrol/README.md @@ -442,8 +442,9 @@ The channels of the smarthome devices will be generated at runtime. Check in the |--------------------------|----------------------|-------------|-------------------------------|------------------------------------------------------------------------------------------ | powerState | Switch | R/W | smartHomeDevice, smartHomeDeviceGroup | Shows and changes the state (ON/OFF) of your device | brightness | Dimmer | R/W | smartHomeDevice, smartHomeDeviceGroup | Shows and changes the brightness of your lamp -| color | Color | R | smartHomeDevice, smartHomeDeviceGroup | Shows the color of your light +| color | Color | R/W | smartHomeDevice, smartHomeDeviceGroup | Shows the color of your light | colorName | String | R/W | smartHomeDevice, smartHomeDeviceGroup | Shows and changes the color name of your light (groups are not able to show their color) +| colorTemperatureInKelvin | Number:Temperature | R/W | smartHomeDevice, smartHomeDeviceGroup | Shows the color temperature of your light | colorTemperatureName | String | R/W | smartHomeDevice, smartHomeDeviceGroup | White temperatures name of your lights (groups are not able to show their color) | armState | String | R/W | smartHomeDevice, smartHomeDeviceGroup | State of your alarm guard. Options: ARMED_AWAY, ARMED_STAY, ARMED_NIGHT, DISARMED (groups are not able to show their state) | burglaryAlarm | Contact | R | smartHomeDevice | Burglary alarm diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerColorTemperatureController.java b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerColorTemperatureController.java index 68ce19508d9b0..7e30099775383 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerColorTemperatureController.java +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerColorTemperatureController.java @@ -12,8 +12,7 @@ */ package org.openhab.binding.amazonechocontrol.internal.smarthome; -import static org.openhab.binding.amazonechocontrol.internal.smarthome.Constants.ITEM_TYPE_NUMBER; -import static org.openhab.binding.amazonechocontrol.internal.smarthome.Constants.ITEM_TYPE_STRING; +import static org.openhab.binding.amazonechocontrol.internal.smarthome.Constants.*; import java.io.IOException; import java.util.List; @@ -28,6 +27,7 @@ import org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices.SmartHomeDevice; import org.openhab.core.library.types.DecimalType; import org.openhab.core.library.types.StringType; +import org.openhab.core.thing.DefaultSystemChannelTypeProvider; import org.openhab.core.thing.type.ChannelTypeUID; import org.openhab.core.types.Command; import org.openhab.core.types.StateDescription; @@ -51,13 +51,13 @@ public class HandlerColorTemperatureController extends HandlerBase { private static final ChannelTypeUID CHANNEL_TYPE_COLOR_TEMPERATURE_NAME = new ChannelTypeUID( AmazonEchoControlBindingConstants.BINDING_ID, "colorTemperatureName"); - private static final ChannelTypeUID CHANNEL_TYPE_COLOR_TEPERATURE_IN_KELVIN = new ChannelTypeUID( - AmazonEchoControlBindingConstants.BINDING_ID, "colorTemperatureInKelvin"); + private static final ChannelTypeUID CHANNEL_TYPE_COLOR_TEMPERATURE_IN_KELVIN = // + DefaultSystemChannelTypeProvider.SYSTEM_CHANNEL_TYPE_UID_COLOR_TEMPERATURE_ABS; // Channel and Properties private static final ChannelInfo COLOR_TEMPERATURE_IN_KELVIN = new ChannelInfo( "colorTemperatureInKelvin" /* propertyName */ , "colorTemperatureInKelvin" /* ChannelId */, - CHANNEL_TYPE_COLOR_TEPERATURE_IN_KELVIN /* Channel Type */ , ITEM_TYPE_NUMBER /* Item Type */); + CHANNEL_TYPE_COLOR_TEMPERATURE_IN_KELVIN /* Channel Type */ , ITEM_TYPE_NUMBER_TEMPERATURE /* Item Type */); private static final ChannelInfo COLOR_TEMPERATURE_NAME = new ChannelInfo("colorProperties" /* propertyName */ , "colorTemperatureName" /* ChannelId */, CHANNEL_TYPE_COLOR_TEMPERATURE_NAME /* Channel Type */ , diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/i18n/amazonechocontrol.properties b/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/i18n/amazonechocontrol.properties index c0914db53d821..99837b9ea0794 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/i18n/amazonechocontrol.properties +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/i18n/amazonechocontrol.properties @@ -81,8 +81,6 @@ channel-type.amazonechocontrol.color.label = Color channel-type.amazonechocontrol.color.description = Color channel-type.amazonechocontrol.colorName.label = Color Name channel-type.amazonechocontrol.colorName.description = Color Name -channel-type.amazonechocontrol.colorTemperatureInKelvin.label = Color Temperature In Kelvin -channel-type.amazonechocontrol.colorTemperatureInKelvin.description = Color Temperature In Kelvin channel-type.amazonechocontrol.colorTemperatureName.label = Color Temperature Name channel-type.amazonechocontrol.colorTemperatureName.description = Color Temperature Name channel-type.amazonechocontrol.equalizerBass.label = Bass diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/thing/thing-types.xml index 0138423261e9c..de40415c35316 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/thing/thing-types.xml @@ -255,6 +255,9 @@ Smart home device connected to Alexa + + 1 + id @@ -269,6 +272,9 @@ Group of smart home devices in your amazon account + + 1 + id @@ -573,11 +579,6 @@ Color Temperature Name - - Number - - Color Temperature In Kelvin - Dimmer diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/update/instructions.xml b/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/update/instructions.xml new file mode 100644 index 0000000000000..a8a36fe8da957 --- /dev/null +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/resources/OH-INF/update/instructions.xml @@ -0,0 +1,22 @@ + + + + + + + system:color-temperature-abs + + + + + + + + system:color-temperature-abs + + + + +