| spinningspeed | String | Read | Spinning speed in the program running on the appliance |
| energyConsumption | Number:Energy | Read | Energy consumption by the currently running program on the appliance |
| waterConsumption | Number:Volume | Read | Water consumption by the currently running program on the appliance |
+| laundryWeight | Number:Mass | Read | Weight of the laundry inside the appliance |
##### Programs
public static final String FINISH_CHANNEL_ID = "finish";
public static final String ENERGY_CONSUMPTION_CHANNEL_ID = "energyConsumption";
public static final String WATER_CONSUMPTION_CHANNEL_ID = "waterConsumption";
+ public static final String LAUNDRY_WEIGHT_CHANNEL_ID = "laundryWeight";
// List of all Thing Type UIDs
public static final ThingTypeUID THING_TYPE_XGW3000 = new ThingTypeUID(BINDING_ID, "xgw3000");
ENERGY_CONSUMPTION(EXTENDED_DEVICE_STATE_PROPERTY_NAME, ENERGY_CONSUMPTION_CHANNEL_ID, QuantityType.class, false,
true),
WATER_CONSUMPTION(EXTENDED_DEVICE_STATE_PROPERTY_NAME, WATER_CONSUMPTION_CHANNEL_ID, QuantityType.class, false,
- true);
+ true),
+ LAUNDRY_WEIGHT(EXTENDED_DEVICE_STATE_PROPERTY_NAME, LAUNDRY_WEIGHT_CHANNEL_ID, QuantityType.class, false, true);
private final Logger logger = LoggerFactory.getLogger(WashingMachineChannelSelector.class);
import org.openhab.core.i18n.TranslationProvider;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.QuantityType;
+import org.openhab.core.library.unit.SIUnits;
import org.openhab.core.library.unit.Units;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.Thing;
public class WashingMachineHandler extends MieleApplianceHandler<WashingMachineChannelSelector>
implements ExtendedDeviceStateListener {
+ private static final int LAUNDRY_WEIGHT_BYTE_POSITION = 44;
private static final int ENERGY_CONSUMPTION_BYTE_POSITION = 51;
private static final int WATER_CONSUMPTION_BYTE_POSITION = 53;
private static final int EXTENDED_STATE_MIN_SIZE_BYTES = 54;
var litres = new QuantityType<>(BigDecimal.valueOf(extendedDeviceState[WATER_CONSUMPTION_BYTE_POSITION] & 0xff),
Units.LITRE);
updateExtendedState(WATER_CONSUMPTION_CHANNEL_ID, litres);
+
+ var weight = new QuantityType<>(
+ BigDecimal.valueOf(256 * (extendedDeviceState[LAUNDRY_WEIGHT_BYTE_POSITION] & 0xff)
+ + (extendedDeviceState[LAUNDRY_WEIGHT_BYTE_POSITION + 1] & 0xff)),
+ SIUnits.GRAM);
+ updateExtendedState(LAUNDRY_WEIGHT_CHANNEL_ID, weight);
}
}
channel-type.miele.heat.description = Remaining heat level of the heating zone/plate
channel-type.miele.info.label = Signal Information
channel-type.miele.info.description = Signals information, check appliance for details
+channel-type.miele.laundry-weight.label = Laundry Weight
+channel-type.miele.laundry-weight.description = Weight of the laundry inside the appliance
channel-type.miele.phase.label = Phase
channel-type.miele.phase.description = Current phase of the program running on the appliance
channel-type.miele.plates.label = Plates
<state readOnly="true" pattern="%.1f l"/>
</channel-type>
+ <channel-type id="laundry-weight" advanced="true">
+ <item-type>Number:Mass</item-type>
+ <label>Laundry Weight</label>
+ <description>Weight of the laundry inside the appliance</description>
+ <state readOnly="true" pattern="%.3f %unit%"/>
+ </channel-type>
+
</thing:thing-descriptions>
<channel id="spinningspeed" typeId="spinningspeed"/>
<channel id="energyConsumption" typeId="energy-consumption"/>
<channel id="waterConsumption" typeId="water-consumption"/>
+ <channel id="laundryWeight" typeId="laundry-weight"/>
</channels>
<properties>
- <property name="thingTypeVersion">2</property>
+ <property name="thingTypeVersion">3</property>
</properties>
<representation-property>uid</representation-property>
<type>miele:failure</type>
</add-channel>
</instruction-set>
+ <instruction-set targetVersion="3">
+ <add-channel id="laundryWeight">
+ <type>miele:laundry-weight</type>
+ </add-channel>
+ </instruction-set>
</thing-type>
</update:update-descriptions>