[lifx] Add channels for controlling absolute color temperature in Kelvin (#11309)
* [lifx] Add channels for controlling absolute color temperature in Kelvin Adds an 'abstemperature' channel to all Thing Types for controlling the absolute color temperature in Kelvin. MultiZone lights also have 'abstemperaturezone' channels that allow for controlling the color temperature of a zone in Kelvin. These channels make it easier to use the same color temperature with lights that have a different color temperature range. Furthermore the channel type tags have been updated which simplifies using the generated items with the semantic model. Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -49,6 +49,8 @@ public class LifxBindingConstants {
|
||||
public static final PercentType DEFAULT_BRIGHTNESS = PercentType.HUNDRED;
|
||||
|
||||
// List of all Channel IDs
|
||||
public static final String CHANNEL_ABS_TEMPERATURE = "abstemperature";
|
||||
public static final String CHANNEL_ABS_TEMPERATURE_ZONE = "abstemperaturezone";
|
||||
public static final String CHANNEL_BRIGHTNESS = "brightness";
|
||||
public static final String CHANNEL_COLOR = "color";
|
||||
public static final String CHANNEL_COLOR_ZONE = "colorzone";
|
||||
@@ -62,12 +64,10 @@ public class LifxBindingConstants {
|
||||
// List of all Channel Type UIDs
|
||||
public static final ChannelTypeUID CHANNEL_TYPE_BRIGHTNESS = new ChannelTypeUID(BINDING_ID, CHANNEL_BRIGHTNESS);
|
||||
public static final ChannelTypeUID CHANNEL_TYPE_COLOR = new ChannelTypeUID(BINDING_ID, CHANNEL_COLOR);
|
||||
public static final ChannelTypeUID CHANNEL_TYPE_COLOR_ZONE = new ChannelTypeUID(BINDING_ID, CHANNEL_COLOR_ZONE);
|
||||
public static final ChannelTypeUID CHANNEL_TYPE_EFFECT = new ChannelTypeUID(BINDING_ID, CHANNEL_EFFECT);
|
||||
public static final ChannelTypeUID CHANNEL_TYPE_HEV_CYCLE = new ChannelTypeUID(BINDING_ID, CHANNEL_HEV_CYCLE);
|
||||
public static final ChannelTypeUID CHANNEL_TYPE_INFRARED = new ChannelTypeUID(BINDING_ID, CHANNEL_INFRARED);
|
||||
public static final ChannelTypeUID CHANNEL_TYPE_TEMPERATURE = new ChannelTypeUID(BINDING_ID, CHANNEL_TEMPERATURE);
|
||||
public static final ChannelTypeUID CHANNEL_TYPE_TEMPERATURE_ZONE = new ChannelTypeUID(BINDING_ID,
|
||||
CHANNEL_TEMPERATURE_ZONE);
|
||||
|
||||
// List of options for effect channel
|
||||
public static final String CHANNEL_TYPE_EFFECT_OPTION_OFF = "off";
|
||||
|
||||
@@ -24,6 +24,8 @@ import org.openhab.core.thing.ThingUID;
|
||||
@NonNullByDefault
|
||||
public interface LifxChannelFactory {
|
||||
|
||||
Channel createAbsTemperatureZoneChannel(ThingUID thingUID, int index);
|
||||
|
||||
Channel createColorZoneChannel(ThingUID thingUID, int index);
|
||||
|
||||
Channel createTemperatureZoneChannel(ThingUID thingUID, int index);
|
||||
|
||||
@@ -14,22 +14,14 @@ package org.openhab.binding.lifx.internal;
|
||||
|
||||
import static org.openhab.binding.lifx.internal.LifxBindingConstants.*;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.core.i18n.LocaleProvider;
|
||||
import org.openhab.core.i18n.TranslationProvider;
|
||||
import org.openhab.core.library.CoreItemFactory;
|
||||
import org.openhab.core.thing.Channel;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.thing.DefaultSystemChannelTypeProvider;
|
||||
import org.openhab.core.thing.ThingUID;
|
||||
import org.openhab.core.thing.binding.builder.ChannelBuilder;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.service.component.ComponentContext;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
|
||||
/**
|
||||
* The {@link LifxChannelFactoryImpl} creates dynamic LIFX channels.
|
||||
@@ -40,71 +32,22 @@ import org.osgi.service.component.annotations.Reference;
|
||||
@Component(service = LifxChannelFactory.class)
|
||||
public class LifxChannelFactoryImpl implements LifxChannelFactory {
|
||||
|
||||
private static final String COLOR_ZONE_LABEL_KEY = "channel-type.lifx.colorzone.label";
|
||||
private static final String COLOR_ZONE_DESCRIPTION_KEY = "channel-type.lifx.colorzone.description";
|
||||
|
||||
private static final String TEMPERATURE_ZONE_LABEL_KEY = "channel-type.lifx.temperaturezone.label";
|
||||
private static final String TEMPERATURE_ZONE_DESCRIPTION_KEY = "channel-type.lifx.temperaturezone.description";
|
||||
|
||||
private @NonNullByDefault({}) Bundle bundle;
|
||||
private @NonNullByDefault({}) TranslationProvider i18nProvider;
|
||||
private @NonNullByDefault({}) LocaleProvider localeProvider;
|
||||
@Override
|
||||
public Channel createAbsTemperatureZoneChannel(ThingUID thingUID, int index) {
|
||||
return ChannelBuilder
|
||||
.create(new ChannelUID(thingUID, CHANNEL_ABS_TEMPERATURE_ZONE + index), CoreItemFactory.NUMBER)
|
||||
.withType(DefaultSystemChannelTypeProvider.SYSTEM_CHANNEL_TYPE_UID_COLOR_TEMPERATURE_ABS).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Channel createColorZoneChannel(ThingUID thingUID, int index) {
|
||||
String label = getText(COLOR_ZONE_LABEL_KEY, index);
|
||||
String description = getText(COLOR_ZONE_DESCRIPTION_KEY, index);
|
||||
return ChannelBuilder.create(new ChannelUID(thingUID, CHANNEL_COLOR_ZONE + index), "Color")
|
||||
.withType(CHANNEL_TYPE_COLOR_ZONE).withLabel(label).withDescription(description).build();
|
||||
return ChannelBuilder.create(new ChannelUID(thingUID, CHANNEL_COLOR_ZONE + index), CoreItemFactory.COLOR)
|
||||
.withType(DefaultSystemChannelTypeProvider.SYSTEM_CHANNEL_TYPE_UID_COLOR).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Channel createTemperatureZoneChannel(ThingUID thingUID, int index) {
|
||||
String label = getText(TEMPERATURE_ZONE_LABEL_KEY, index);
|
||||
String description = getText(TEMPERATURE_ZONE_DESCRIPTION_KEY, index);
|
||||
return ChannelBuilder.create(new ChannelUID(thingUID, CHANNEL_TEMPERATURE_ZONE + index), "Dimmer")
|
||||
.withType(CHANNEL_TYPE_TEMPERATURE_ZONE).withLabel(label).withDescription(description).build();
|
||||
}
|
||||
|
||||
private @Nullable String getDefaultText(String key) {
|
||||
return i18nProvider.getText(bundle, key, key, Locale.ENGLISH);
|
||||
}
|
||||
|
||||
private String getText(String key, Object... arguments) {
|
||||
Locale locale = localeProvider != null ? localeProvider.getLocale() : Locale.ENGLISH;
|
||||
if (i18nProvider == null) {
|
||||
return key;
|
||||
}
|
||||
|
||||
String text = i18nProvider.getText(bundle, key, getDefaultText(key), locale, arguments);
|
||||
return text != null ? text : key;
|
||||
}
|
||||
|
||||
@Activate
|
||||
protected void activate(ComponentContext componentContext) {
|
||||
this.bundle = componentContext.getBundleContext().getBundle();
|
||||
}
|
||||
|
||||
@Deactivate
|
||||
protected void deactivate(ComponentContext componentContext) {
|
||||
this.bundle = null;
|
||||
}
|
||||
|
||||
@Reference
|
||||
protected void setTranslationProvider(TranslationProvider i18nProvider) {
|
||||
this.i18nProvider = i18nProvider;
|
||||
}
|
||||
|
||||
protected void unsetTranslationProvider(TranslationProvider i18nProvider) {
|
||||
this.i18nProvider = null;
|
||||
}
|
||||
|
||||
@Reference
|
||||
protected void setLocaleProvider(LocaleProvider localeProvider) {
|
||||
this.localeProvider = localeProvider;
|
||||
}
|
||||
|
||||
protected void unsetLocaleProvider(LocaleProvider localeProvider) {
|
||||
this.localeProvider = null;
|
||||
return ChannelBuilder.create(new ChannelUID(thingUID, CHANNEL_TEMPERATURE_ZONE + index), CoreItemFactory.DIMMER)
|
||||
.withType(DefaultSystemChannelTypeProvider.SYSTEM_CHANNEL_TYPE_UID_COLOR_TEMPERATURE).build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,6 +182,7 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
updateStateIfChanged(CHANNEL_BRIGHTNESS, hsb.getBrightness());
|
||||
updateStateIfChanged(CHANNEL_TEMPERATURE,
|
||||
kelvinToPercentType(updateColor.getKelvin(), features.getTemperatureRange()));
|
||||
updateStateIfChanged(CHANNEL_ABS_TEMPERATURE, new DecimalType(updateColor.getKelvin()));
|
||||
|
||||
updateZoneChannels(powerState, colors);
|
||||
}
|
||||
@@ -240,6 +241,7 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
updateStateIfChanged(CHANNEL_COLOR_ZONE + i, updateColor.getHSB());
|
||||
updateStateIfChanged(CHANNEL_TEMPERATURE_ZONE + i,
|
||||
kelvinToPercentType(updateColor.getKelvin(), features.getTemperatureRange()));
|
||||
updateStateIfChanged(CHANNEL_ABS_TEMPERATURE_ZONE + i, new DecimalType(updateColor.getKelvin()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -473,7 +475,8 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
// retain non-zone channels
|
||||
for (Channel channel : getThing().getChannels()) {
|
||||
String channelId = channel.getUID().getId();
|
||||
if (!channelId.startsWith(CHANNEL_COLOR_ZONE) && !channelId.startsWith(CHANNEL_TEMPERATURE_ZONE)) {
|
||||
if (!channelId.startsWith(CHANNEL_ABS_TEMPERATURE_ZONE) && !channelId.startsWith(CHANNEL_COLOR_ZONE)
|
||||
&& !channelId.startsWith(CHANNEL_TEMPERATURE_ZONE)) {
|
||||
newChannels.add(channel);
|
||||
}
|
||||
}
|
||||
@@ -482,6 +485,7 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
for (int i = 0; i < zones; i++) {
|
||||
newChannels.add(channelFactory.createColorZoneChannel(getThing().getUID(), i));
|
||||
newChannels.add(channelFactory.createTemperatureZoneChannel(getThing().getUID(), i));
|
||||
newChannels.add(channelFactory.createAbsTemperatureZoneChannel(getThing().getUID(), i));
|
||||
}
|
||||
|
||||
updateThing(editThing().withChannels(newChannels).build());
|
||||
@@ -552,6 +556,13 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
|
||||
private @Nullable Runnable getChannelCommandRunnable(ChannelUID channelUID, Command command) {
|
||||
switch (channelUID.getId()) {
|
||||
case CHANNEL_ABS_TEMPERATURE:
|
||||
case CHANNEL_TEMPERATURE:
|
||||
if (command instanceof DecimalType) {
|
||||
return () -> handleTemperatureCommand((DecimalType) command);
|
||||
} else if (command instanceof IncreaseDecreaseType) {
|
||||
return () -> handleIncreaseDecreaseTemperatureCommand((IncreaseDecreaseType) command);
|
||||
}
|
||||
case CHANNEL_BRIGHTNESS:
|
||||
if (command instanceof PercentType) {
|
||||
return () -> handlePercentCommand((PercentType) command);
|
||||
@@ -559,8 +570,6 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
return () -> handleOnOffCommand((OnOffType) command);
|
||||
} else if (command instanceof IncreaseDecreaseType) {
|
||||
return () -> handleIncreaseDecreaseCommand((IncreaseDecreaseType) command);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
case CHANNEL_COLOR:
|
||||
if (command instanceof HSBType) {
|
||||
@@ -571,40 +580,29 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
return () -> handleOnOffCommand((OnOffType) command);
|
||||
} else if (command instanceof IncreaseDecreaseType) {
|
||||
return () -> handleIncreaseDecreaseCommand((IncreaseDecreaseType) command);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
case CHANNEL_EFFECT:
|
||||
if (command instanceof StringType && features.hasFeature(TILE_EFFECT)) {
|
||||
return () -> handleTileEffectCommand((StringType) command);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
case CHANNEL_HEV_CYCLE:
|
||||
if (command instanceof OnOffType) {
|
||||
return () -> handleHevCycleCommand((OnOffType) command);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
case CHANNEL_INFRARED:
|
||||
if (command instanceof PercentType) {
|
||||
return () -> handleInfraredCommand((PercentType) command);
|
||||
} else if (command instanceof IncreaseDecreaseType) {
|
||||
return () -> handleIncreaseDecreaseInfraredCommand((IncreaseDecreaseType) command);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
case CHANNEL_TEMPERATURE:
|
||||
if (command instanceof PercentType) {
|
||||
return () -> handleTemperatureCommand((PercentType) command);
|
||||
} else if (command instanceof IncreaseDecreaseType) {
|
||||
return () -> handleIncreaseDecreaseTemperatureCommand((IncreaseDecreaseType) command);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
default:
|
||||
try {
|
||||
if (channelUID.getId().startsWith(CHANNEL_COLOR_ZONE)) {
|
||||
if (channelUID.getId().startsWith(CHANNEL_ABS_TEMPERATURE_ZONE)) {
|
||||
int zoneIndex = Integer.parseInt(channelUID.getId().replace(CHANNEL_ABS_TEMPERATURE_ZONE, ""));
|
||||
if (command instanceof DecimalType) {
|
||||
return () -> handleTemperatureCommand((DecimalType) command, zoneIndex);
|
||||
}
|
||||
} else if (channelUID.getId().startsWith(CHANNEL_COLOR_ZONE)) {
|
||||
int zoneIndex = Integer.parseInt(channelUID.getId().replace(CHANNEL_COLOR_ZONE, ""));
|
||||
if (command instanceof HSBType) {
|
||||
return () -> handleHSBCommand((HSBType) command, zoneIndex);
|
||||
@@ -612,8 +610,6 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
return () -> handlePercentCommand((PercentType) command, zoneIndex);
|
||||
} else if (command instanceof IncreaseDecreaseType) {
|
||||
return () -> handleIncreaseDecreaseCommand((IncreaseDecreaseType) command, zoneIndex);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else if (channelUID.getId().startsWith(CHANNEL_TEMPERATURE_ZONE)) {
|
||||
int zoneIndex = Integer.parseInt(channelUID.getId().replace(CHANNEL_TEMPERATURE_ZONE, ""));
|
||||
@@ -622,18 +618,14 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
} else if (command instanceof IncreaseDecreaseType) {
|
||||
return () -> handleIncreaseDecreaseTemperatureCommand((IncreaseDecreaseType) command,
|
||||
zoneIndex);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
logger.error("Failed to parse zone index for a command of a light ({}) : {}", logId,
|
||||
e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private LifxLightState getLightStateForCommand() {
|
||||
@@ -650,6 +642,10 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
private void handleRefreshCommand(ChannelUID channelUID) {
|
||||
channelStates.remove(channelUID.getId());
|
||||
switch (channelUID.getId()) {
|
||||
case CHANNEL_ABS_TEMPERATURE:
|
||||
case CHANNEL_TEMPERATURE:
|
||||
sendPacket(new GetRequest());
|
||||
break;
|
||||
case CHANNEL_COLOR:
|
||||
case CHANNEL_BRIGHTNESS:
|
||||
sendPacket(new GetLightPowerRequest());
|
||||
@@ -669,25 +665,22 @@ public class LifxLightHandler extends BaseThingHandler {
|
||||
case CHANNEL_SIGNAL_STRENGTH:
|
||||
sendPacket(new GetWifiInfoRequest());
|
||||
break;
|
||||
case CHANNEL_TEMPERATURE:
|
||||
sendPacket(new GetRequest());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void handleTemperatureCommand(PercentType temperature) {
|
||||
private void handleTemperatureCommand(DecimalType temperature) {
|
||||
HSBK newColor = getLightStateForCommand().getColor();
|
||||
newColor.setSaturation(PercentType.ZERO);
|
||||
newColor.setKelvin(percentTypeToKelvin(temperature, features.getTemperatureRange()));
|
||||
newColor.setKelvin(commandToKelvin(temperature, features.getTemperatureRange()));
|
||||
getLightStateForCommand().setColor(newColor);
|
||||
}
|
||||
|
||||
private void handleTemperatureCommand(PercentType temperature, int zoneIndex) {
|
||||
private void handleTemperatureCommand(DecimalType temperature, int zoneIndex) {
|
||||
HSBK newColor = getLightStateForCommand().getColor(zoneIndex);
|
||||
newColor.setSaturation(PercentType.ZERO);
|
||||
newColor.setKelvin(percentTypeToKelvin(temperature, features.getTemperatureRange()));
|
||||
newColor.setKelvin(commandToKelvin(temperature, features.getTemperatureRange()));
|
||||
getLightStateForCommand().setColor(newColor, zoneIndex);
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,16 @@ public final class LifxMessageUtil {
|
||||
return new PercentType(value);
|
||||
}
|
||||
|
||||
public static int commandToKelvin(DecimalType temperature, TemperatureRange temperatureRange) {
|
||||
return temperature instanceof PercentType ? percentTypeToKelvin((PercentType) temperature, temperatureRange)
|
||||
: decimalTypeToKelvin(temperature, temperatureRange);
|
||||
}
|
||||
|
||||
public static int decimalTypeToKelvin(DecimalType temperature, TemperatureRange temperatureRange) {
|
||||
return Math.round(Math.min(Math.max(temperature.intValue(), temperatureRange.getMinimum()),
|
||||
temperatureRange.getMaximum()));
|
||||
}
|
||||
|
||||
public static int percentTypeToKelvin(PercentType temperature, TemperatureRange temperatureRange) {
|
||||
return Math.round(
|
||||
temperatureRange.getMaximum() - (temperature.floatValue() * (temperatureRange.getRange() / 100)));
|
||||
|
||||
@@ -20,24 +20,20 @@ thing-type.config.lifx.light.fadetime.description = The time to fade to the new
|
||||
|
||||
# channel types
|
||||
channel-type.lifx.brightness.label = Brightness
|
||||
channel-type.lifx.brightness.description = Sets the brightness of the light
|
||||
channel-type.lifx.brightness.description = Controls the brightness and switches the light on and off
|
||||
channel-type.lifx.color.label = Color
|
||||
channel-type.lifx.color.description = Selects the color of the light
|
||||
channel-type.lifx.colorzone.label = Color Zone {0}
|
||||
channel-type.lifx.colorzone.description = Selects the zone {0} color of the light
|
||||
channel-type.lifx.color.description = Controls the color of the light
|
||||
channel-type.lifx.effect.label = Effect
|
||||
channel-type.lifx.effect.description = Sets the effect of the light
|
||||
channel-type.lifx.effect.description = Controls the effect of the light
|
||||
channel-type.lifx.effect.state.option.off = Off
|
||||
channel-type.lifx.effect.state.option.morph = Morph
|
||||
channel-type.lifx.effect.state.option.flame = Flame
|
||||
channel-type.lifx.hevcycle.label = HEV Cycle
|
||||
channel-type.lifx.hevcycle.description = Controls the HEV clean cycle of the light
|
||||
channel-type.lifx.infrared.label = Infrared
|
||||
channel-type.lifx.infrared.description = Sets the infrared of the light
|
||||
channel-type.lifx.temperature.label = Temperature
|
||||
channel-type.lifx.temperature.description = Sets the temperature of the light
|
||||
channel-type.lifx.temperaturezone.label = Temperature Zone {0}
|
||||
channel-type.lifx.temperaturezone.description = Sets the zone {0} temperature of the light
|
||||
channel-type.lifx.infrared.description = Controls the infrared level of the light
|
||||
channel-type.lifx.temperature.label = Color Temperature
|
||||
channel-type.lifx.temperature.description = Controls the color temperature of the light from 0 (cold) to 100 (warm)
|
||||
|
||||
# channel type configuration
|
||||
channel-type.config.lifx.brightness.powerOnBrightness.label = Power On Brightness
|
||||
|
||||
@@ -20,24 +20,20 @@ thing-type.config.lifx.light.fadetime.description = De tijdsduur van het vervage
|
||||
|
||||
# channel types
|
||||
channel-type.lifx.brightness.label = Helderheid
|
||||
channel-type.lifx.brightness.description = Bepaalt de helderheid van de lamp
|
||||
channel-type.lifx.brightness.description = Bepaalt de helderheid en schakelt het licht aan en uit
|
||||
channel-type.lifx.color.label = Kleur
|
||||
channel-type.lifx.color.description = Bepaalt de kleur van de lamp
|
||||
channel-type.lifx.colorzone.label = Kleur Zone {0}
|
||||
channel-type.lifx.colorzone.description = Bepaalt de kleur van lampzone {0}
|
||||
channel-type.lifx.color.description = Bepaalt de kleur van het licht
|
||||
channel-type.lifx.effect.label = Effect
|
||||
channel-type.lifx.effect.description = Bepaalt het lichteffect
|
||||
channel-type.lifx.effect.state.option.off = Uit
|
||||
channel-type.lifx.effect.state.option.morph = Morph
|
||||
channel-type.lifx.effect.state.option.flame = Vlam
|
||||
channel-type.lifx.hevcycle.label = HEV Cyclus
|
||||
channel-type.lifx.hevcycle.description = Bedient de HEV schoonmaakcylcus van de lamp
|
||||
channel-type.lifx.hevcycle.description = Bedient de HEV schoonmaakcyclus van de lamp
|
||||
channel-type.lifx.infrared.label = Infrarood
|
||||
channel-type.lifx.infrared.description = Bepaalt het infraroodniveau van de lamp
|
||||
channel-type.lifx.temperature.label = Temperatuur
|
||||
channel-type.lifx.temperature.description = Bepaalt de kleurtemperatuur van de lamp
|
||||
channel-type.lifx.temperaturezone.label = Temperatuur Zone {0}
|
||||
channel-type.lifx.temperaturezone.description = Bepaalt de kleurtemperatuur van lampzone {0}
|
||||
channel-type.lifx.temperature.label = Kleurtemperatuur
|
||||
channel-type.lifx.temperature.description = Bepaalt de kleurtemperatuur van het licht van 0 (koud) tot 100 (warm)
|
||||
|
||||
# channel type configuration
|
||||
channel-type.config.lifx.brightness.powerOnBrightness.label = Inschakelhelderheid
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
<channel-type id="brightness">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>Brightness</label>
|
||||
<description>Sets the brightness of the light</description>
|
||||
<description>Controls the brightness and switches the light on and off</description>
|
||||
<category>DimmableLight</category>
|
||||
<tags>
|
||||
<tag>Lighting</tag>
|
||||
<tag>Control</tag>
|
||||
<tag>Light</tag>
|
||||
</tags>
|
||||
<config-description-ref uri="channel-type:lifx:brightness"/>
|
||||
</channel-type>
|
||||
@@ -18,56 +19,56 @@
|
||||
<channel-type id="color">
|
||||
<item-type>Color</item-type>
|
||||
<label>Color</label>
|
||||
<description>Selects the color of the light</description>
|
||||
<description>Controls the color of the light</description>
|
||||
<category>ColorLight</category>
|
||||
<tags>
|
||||
<tag>Lighting</tag>
|
||||
<tag>Control</tag>
|
||||
<tag>Light</tag>
|
||||
</tags>
|
||||
<config-description-ref uri="channel-type:lifx:color"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="colorzone" advanced="true">
|
||||
<item-type>Color</item-type>
|
||||
<label>Color Zone</label>
|
||||
<description>Selects the zone color of the light</description>
|
||||
<category>ColorLight</category>
|
||||
<tags>
|
||||
<tag>Lighting</tag>
|
||||
</tags>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="hevcycle">
|
||||
<item-type>Switch</item-type>
|
||||
<label>HEV Cycle</label>
|
||||
<description>Controls the HEV clean cycle of the light</description>
|
||||
<tags>
|
||||
<tag>Control</tag>
|
||||
<tag>Light</tag>
|
||||
</tags>
|
||||
<config-description-ref uri="channel-type:lifx:hevcycle"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="infrared">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>Infrared</label>
|
||||
<description>Sets the infrared of the light</description>
|
||||
<description>Controls the infrared level of the light</description>
|
||||
<tags>
|
||||
<tag>Control</tag>
|
||||
<tag>Light</tag>
|
||||
</tags>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="temperature">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>Temperature</label>
|
||||
<description>Sets the temperature of the light</description>
|
||||
<label>Color Temperature</label>
|
||||
<description>Controls the color temperature of the light from 0 (cold) to 100 (warm)</description>
|
||||
<category>ColorLight</category>
|
||||
<tags>
|
||||
<tag>Control</tag>
|
||||
<tag>ColorTemperature</tag>
|
||||
</tags>
|
||||
<config-description-ref uri="channel-type:lifx:temperature"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="temperaturezone" advanced="true">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>Temperature Zone</label>
|
||||
<description>Sets the zone temperature of the light</description>
|
||||
<category>ColorLight</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="effect">
|
||||
<item-type>String</item-type>
|
||||
<label>Effect</label>
|
||||
<description>Sets the effect of the light</description>
|
||||
<description>Controls the effect of the light</description>
|
||||
<tags>
|
||||
<tag>Control</tag>
|
||||
<tag>Light</tag>
|
||||
</tags>
|
||||
<state>
|
||||
<options>
|
||||
<option value="off">Off</option>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<channels>
|
||||
<channel id="color" typeId="color"/>
|
||||
<channel id="temperature" typeId="temperature"/>
|
||||
<channel id="abstemperature" typeId="system.color-temperature-abs"/>
|
||||
<channel id="hevcycle" typeId="hevcycle"/>
|
||||
<channel id="signalstrength" typeId="system.signal-strength"/>
|
||||
</channels>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<channels>
|
||||
<channel id="color" typeId="color"/>
|
||||
<channel id="temperature" typeId="temperature"/>
|
||||
<channel id="abstemperature" typeId="system.color-temperature-abs"/>
|
||||
<channel id="infrared" typeId="infrared"/>
|
||||
<channel id="signalstrength" typeId="system.signal-strength"/>
|
||||
</channels>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<channels>
|
||||
<channel id="color" typeId="color"/>
|
||||
<channel id="temperature" typeId="temperature"/>
|
||||
<channel id="abstemperature" typeId="system.color-temperature-abs"/>
|
||||
<channel id="signalstrength" typeId="system.signal-strength"/>
|
||||
</channels>
|
||||
<representation-property>macAddress</representation-property>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<channels>
|
||||
<channel id="color" typeId="color"/>
|
||||
<channel id="temperature" typeId="temperature"/>
|
||||
<channel id="abstemperature" typeId="system.color-temperature-abs"/>
|
||||
<channel id="signalstrength" typeId="system.signal-strength"/>
|
||||
</channels>
|
||||
<representation-property>macAddress</representation-property>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<channels>
|
||||
<channel id="color" typeId="color"/>
|
||||
<channel id="temperature" typeId="temperature"/>
|
||||
<channel id="abstemperature" typeId="system.color-temperature-abs"/>
|
||||
<channel id="signalstrength" typeId="system.signal-strength"/>
|
||||
<channel id="effect" typeId="effect"/>
|
||||
</channels>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<channels>
|
||||
<channel id="brightness" typeId="brightness"/>
|
||||
<channel id="temperature" typeId="temperature"/>
|
||||
<channel id="abstemperature" typeId="system.color-temperature-abs"/>
|
||||
<channel id="signalstrength" typeId="system.signal-strength"/>
|
||||
</channels>
|
||||
<representation-property>macAddress</representation-property>
|
||||
|
||||
Reference in New Issue
Block a user