[rfxcom] Support for Lucciair DC Speed (#12038)
* [rfxcom] Support speed for luca DC version * [rfxcom] Handle null value for speed * [rfxcom] Update readme and add migration channel Signed-off-by: Martin van Wingerden <martin@martinvw.nl>
This commit is contained in:
parent
a3b6f74764
commit
39ebfe2b07
|
@ -500,9 +500,10 @@ A Lucci Air DC fan device
|
||||||
##### Channels
|
##### Channels
|
||||||
|
|
||||||
| Name | Channel Type | Item Type | Remarks |
|
| Name | Channel Type | Item Type | Remarks |
|
||||||
|--------------|-------------------------------------|---------------|---------------------------------------------------------------|
|
|-----------------|-------------------------------------|---------------|--------------------------------------------------------------|
|
||||||
| commandString | [commandString](#channels) | String | Options: POWER, UP, DOWN, LIGHT, REVERSE, NATURAL_FLOW, PAIR |
|
| commandString | [commandString](#channels) | String | Options: POWER, UP, DOWN, LIGHT, REVERSE, NATURAL_FLOW, PAIR |
|
||||||
| fanSpeed | [fanspeedcontrol](#channels) | RollerShutter | Options: UP / DOWN |
|
| fanSpeedControl | [fanspeedcontrol](#channels) | RollerShutter | Options: UP / DOWN |
|
||||||
|
| fanSpeed | [fanspeed](#channels) | Number | Options: 1,2,3,4,5,6 |
|
||||||
| fanLight | [fanlight](#channels) | Switch | |
|
| fanLight | [fanlight](#channels) | Switch | |
|
||||||
| signalLevel | [system.signal-strength](#channels) | Number | |
|
| signalLevel | [system.signal-strength](#channels) | Number | |
|
||||||
|
|
||||||
|
@ -543,10 +544,10 @@ A Novy extractor fan.
|
||||||
##### Channels
|
##### Channels
|
||||||
|
|
||||||
| Name | Channel Type | Item Type | Remarks |
|
| Name | Channel Type | Item Type | Remarks |
|
||||||
|--------------|-------------------------------------|---------------|--------------------------|
|
|-----------------|-------------------------------------|---------------|--------------------------|
|
||||||
| command | [command](#channels) | Switch | |
|
| command | [command](#channels) | Switch | |
|
||||||
| commandString | [commandString](#channels) | String | Options: POWER, UP, DOWN, LIGHT, LEARN, RESET_FILTER |
|
| commandString | [commandString](#channels) | String | Options: POWER, UP, DOWN, LIGHT, LEARN, RESET_FILTER |
|
||||||
| fanSpeed | [fanspeedcontrol](#channels) | RollerShutter | Options: UP / DOWN |
|
| fanSpeedControl | [fanspeedcontrol](#channels) | RollerShutter | Options: UP / DOWN |
|
||||||
| fanLight | [fanlight](#channels) | Switch | |
|
| fanLight | [fanlight](#channels) | Switch | |
|
||||||
| signalLevel | [system.signal-strength](#channels) | Number | |
|
| signalLevel | [system.signal-strength](#channels) | Number | |
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,12 @@ public class RFXComFanMessage extends RFXComDeviceMessageImpl<RFXComFanMessage.S
|
||||||
LUCCI_AIR_DC_REVERSE(5, LUCCI_AIR_DC),
|
LUCCI_AIR_DC_REVERSE(5, LUCCI_AIR_DC),
|
||||||
LUCCI_AIR_DC_NATURAL_FLOW(6, LUCCI_AIR_DC),
|
LUCCI_AIR_DC_NATURAL_FLOW(6, LUCCI_AIR_DC),
|
||||||
LUCCI_AIR_DC_PAIR(7, LUCCI_AIR_DC),
|
LUCCI_AIR_DC_PAIR(7, LUCCI_AIR_DC),
|
||||||
|
LUCCI_AIR_DC_SPEED_1(8, 1, LUCCI_AIR_DC),
|
||||||
|
LUCCI_AIR_DC_SPEED_2(9, 2, LUCCI_AIR_DC),
|
||||||
|
LUCCI_AIR_DC_SPEED_3(10, 3, LUCCI_AIR_DC),
|
||||||
|
LUCCI_AIR_DC_SPEED_4(11, 4, LUCCI_AIR_DC),
|
||||||
|
LUCCI_AIR_DC_SPEED_5(12, 5, LUCCI_AIR_DC),
|
||||||
|
LUCCI_AIR_DC_SPEED_6(13, 6, LUCCI_AIR_DC),
|
||||||
|
|
||||||
LUCCI_AIR_DC_II_POWER_OFF(1, 0, LUCCI_AIR_DC_II),
|
LUCCI_AIR_DC_II_POWER_OFF(1, 0, LUCCI_AIR_DC_II),
|
||||||
LUCCI_AIR_DC_II_SPEED_1(2, 1, LUCCI_AIR_DC_II),
|
LUCCI_AIR_DC_II_SPEED_1(2, 1, LUCCI_AIR_DC_II),
|
||||||
|
@ -141,7 +147,7 @@ public class RFXComFanMessage extends RFXComDeviceMessageImpl<RFXComFanMessage.S
|
||||||
@Nullable
|
@Nullable
|
||||||
public static Commands bySpeed(SubType subType, int speed) {
|
public static Commands bySpeed(SubType subType, int speed) {
|
||||||
for (Commands value : values()) {
|
for (Commands value : values()) {
|
||||||
if (value.supportedBySubTypes.contains(subType) && value.speed == speed) {
|
if (value.supportedBySubTypes.contains(subType) && value.speed != null && value.speed == speed) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,7 +175,9 @@ public class RFXComFanMessage extends RFXComDeviceMessageImpl<RFXComFanMessage.S
|
||||||
LUCCI_AIR_DC_II_LIGHT, FALMEC_LIGHT_ON, NOVY_LIGHT);
|
LUCCI_AIR_DC_II_LIGHT, FALMEC_LIGHT_ON, NOVY_LIGHT);
|
||||||
private static final List<Commands> ON_COMMANDS = Arrays.asList(HI, MED, LOW, FALMEC_SPEED_1, FALMEC_SPEED_2,
|
private static final List<Commands> ON_COMMANDS = Arrays.asList(HI, MED, LOW, FALMEC_SPEED_1, FALMEC_SPEED_2,
|
||||||
FALMEC_SPEED_3, FALMEC_SPEED_4, LUCCI_AIR_DC_II_SPEED_1, LUCCI_AIR_DC_II_SPEED_2, LUCCI_AIR_DC_II_SPEED_3,
|
FALMEC_SPEED_3, FALMEC_SPEED_4, LUCCI_AIR_DC_II_SPEED_1, LUCCI_AIR_DC_II_SPEED_2, LUCCI_AIR_DC_II_SPEED_3,
|
||||||
LUCCI_AIR_DC_II_SPEED_4, LUCCI_AIR_DC_II_SPEED_5, LUCCI_AIR_DC_II_SPEED_6);
|
LUCCI_AIR_DC_II_SPEED_4, LUCCI_AIR_DC_II_SPEED_5, LUCCI_AIR_DC_II_SPEED_6, LUCCI_AIR_DC_SPEED_1,
|
||||||
|
LUCCI_AIR_DC_SPEED_2, LUCCI_AIR_DC_SPEED_3, LUCCI_AIR_DC_SPEED_4, LUCCI_AIR_DC_SPEED_5,
|
||||||
|
LUCCI_AIR_DC_SPEED_6);
|
||||||
private static final List<Commands> OFF_COMMANDS = Arrays.asList(OFF, FALMEC_POWER_OFF, LUCCI_AIR_DC_II_POWER_OFF);
|
private static final List<Commands> OFF_COMMANDS = Arrays.asList(OFF, FALMEC_POWER_OFF, LUCCI_AIR_DC_II_POWER_OFF);
|
||||||
|
|
||||||
private SubType subType;
|
private SubType subType;
|
||||||
|
@ -321,6 +329,12 @@ public class RFXComFanMessage extends RFXComDeviceMessageImpl<RFXComFanMessage.S
|
||||||
case FT1211R_SPEED_3:
|
case FT1211R_SPEED_3:
|
||||||
case FT1211R_SPEED_4:
|
case FT1211R_SPEED_4:
|
||||||
case FT1211R_SPEED_5:
|
case FT1211R_SPEED_5:
|
||||||
|
case LUCCI_AIR_DC_SPEED_1:
|
||||||
|
case LUCCI_AIR_DC_SPEED_2:
|
||||||
|
case LUCCI_AIR_DC_SPEED_3:
|
||||||
|
case LUCCI_AIR_DC_SPEED_4:
|
||||||
|
case LUCCI_AIR_DC_SPEED_5:
|
||||||
|
case LUCCI_AIR_DC_SPEED_6:
|
||||||
case LUCCI_AIR_DC_II_POWER_OFF:
|
case LUCCI_AIR_DC_II_POWER_OFF:
|
||||||
case LUCCI_AIR_DC_II_SPEED_1:
|
case LUCCI_AIR_DC_II_SPEED_1:
|
||||||
case LUCCI_AIR_DC_II_SPEED_2:
|
case LUCCI_AIR_DC_II_SPEED_2:
|
||||||
|
@ -460,6 +474,9 @@ public class RFXComFanMessage extends RFXComDeviceMessageImpl<RFXComFanMessage.S
|
||||||
|
|
||||||
case LUCCI_AIR_DC_II:
|
case LUCCI_AIR_DC_II:
|
||||||
return LUCCI_AIR_DC_II_LIGHT;
|
return LUCCI_AIR_DC_II_LIGHT;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// return exception
|
||||||
}
|
}
|
||||||
} else if (type == OnOffType.OFF && subType == FALMEC) {
|
} else if (type == OnOffType.OFF && subType == FALMEC) {
|
||||||
return Commands.FALMEC_LIGHT_OFF;
|
return Commands.FALMEC_LIGHT_OFF;
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
|
|
||||||
<channels>
|
<channels>
|
||||||
<channel id="commandString" typeId="commandString"/>
|
<channel id="commandString" typeId="commandString"/>
|
||||||
<channel id="fanSpeed" typeId="fanspeedcontrol"/>
|
<channel id="fanSpeedControl" typeId="fanspeedcontrol"/>
|
||||||
|
<channel id="fanSpeed" typeId="fanspeed"/>
|
||||||
<channel id="fanLight" typeId="command"/>
|
<channel id="fanLight" typeId="command"/>
|
||||||
<channel id="signalLevel" typeId="system.signal-strength"/>
|
<channel id="signalLevel" typeId="system.signal-strength"/>
|
||||||
</channels>
|
</channels>
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
<channels>
|
<channels>
|
||||||
<channel id="commandString" typeId="commandString"/>
|
<channel id="commandString" typeId="commandString"/>
|
||||||
|
<channel id="fanSpeedControl" typeId="fanspeedcontrol"/>
|
||||||
|
<!-- Deprecated fanSpeed should only be used for the numeric channel fanspeed -->
|
||||||
<channel id="fanSpeed" typeId="fanspeedcontrol"/>
|
<channel id="fanSpeed" typeId="fanspeedcontrol"/>
|
||||||
<channel id="fanLight" typeId="command"/>
|
<channel id="fanLight" typeId="command"/>
|
||||||
<channel id="signalLevel" typeId="system.signal-strength"/>
|
<channel id="signalLevel" typeId="system.signal-strength"/>
|
||||||
|
|
Loading…
Reference in New Issue