]> git.basschouten.com Git - openhab-addons.git/commitdiff
fix t31 fire and system statuses (#12252)
authorLuca Calcaterra <calcaterra.luca@gmail.com>
Sat, 26 Feb 2022 10:04:11 +0000 (11:04 +0100)
committerGitHub <noreply@github.com>
Sat, 26 Feb 2022 10:04:11 +0000 (11:04 +0100)
Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com>
bundles/org.openhab.binding.souliss/src/main/java/org/openhab/binding/souliss/internal/handler/SoulissT31Handler.java
bundles/org.openhab.binding.souliss/src/main/resources/OH-INF/thing/thing-types.xml

index a7d4cea61c1cc782426a016021d46c8f49b5db7c..dce7452407ab55fc66322891101c2baa1370e2f7 100644 (file)
@@ -49,7 +49,6 @@ public class SoulissT31Handler extends SoulissGenericHandler {
     StringType fanStateValue = StringType.EMPTY;
     StringType powerState = StringType.EMPTY;
     StringType fireState = StringType.EMPTY;
-
     StringType lastModeState = StringType.EMPTY;
     StringType modeStateValue = StringType.EMPTY;
 
@@ -166,6 +165,12 @@ public class SoulissT31Handler extends SoulissGenericHandler {
                     break;
 
                 case SoulissBindingConstants.T31_HEATINGMODE_MESSAGE_MODE_CHANNEL:
+                    if (!modeStateValue.equals(state)) {
+                        this.updateState(SoulissBindingConstants.T31_MODE_CHANNEL, (StringType) state);
+                        modeStateValue = (StringType) state;
+                    }
+                    break;
+
                 case SoulissBindingConstants.T31_COOLINGMODE_MESSAGE_MODE_CHANNEL:
                     if (!modeStateValue.equals(state)) {
                         this.updateState(SoulissBindingConstants.T31_MODE_CHANNEL, (StringType) state);
@@ -189,13 +194,13 @@ public class SoulissT31Handler extends SoulissGenericHandler {
                 case SoulissBindingConstants.T31_ON_MESSAGE_FIRE_CHANNEL:
                     if (!fireState.equals(state)) {
                         this.updateState(SoulissBindingConstants.T31_FIRE_CHANNEL, OnOffType.ON);
-                        powerState = (StringType) state;
+                        fireState = (StringType) state;
                     }
                     break;
                 case SoulissBindingConstants.T31_OFF_MESSAGE_FIRE_CHANNEL:
                     if (!fireState.equals(state)) {
                         this.updateState(SoulissBindingConstants.T31_FIRE_CHANNEL, OnOffType.OFF);
-                        powerState = (StringType) state;
+                        fireState = (StringType) state;
                     }
                     break;
 
index b1ad872e1319efac048bdf66973248a57f936f6f..f7fabd7000d21f88ef7cde0b1c1ce0440b2de02d 100644 (file)
        </channel-type>
 
        <channel-type id="button">
-               <kind>trigger</kind>
+               <item-type>Switch</item-type>
                <label>Button</label>
                <description>Button to trigger something</description>
                <category>Switch</category>
        </channel-type>
 
        <channel-type id="buttonReadOnly">
-               <kind>trigger</kind>
+               <item-type>Switch</item-type>
                <label>Button</label>
                <description>Button to trigger something</description>
                <category>Switch</category>
 
        <channel-type id="float6n">
                <item-type>Number</item-type>
-               <kind>trigger</kind>
                <label>Setpoint</label>
                <description>Floating Point Input</description>
                <category>Temperature</category>
                <state readOnly="true" pattern="%.1f %unit%"/>
        </channel-type>
 
-       <channel-type id="setpointTemperature" advanced="true">
+       <channel-type id="setpointTemperature">
                <item-type>Number:Temperature</item-type>
                <label>Setpoint Temperature</label>
                <description>Setpoint temperature</description>