Skip to content

Commit

Permalink
Merge branch 'openhab:main' into 10218-hue-add-hue-sync-box
Browse files Browse the repository at this point in the history
  • Loading branch information
pgfeller committed Mar 12, 2024
2 parents 2f47aac + 51b63f3 commit edf4eb7
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bundles/org.openhab.binding.govee/README.md
Expand Up @@ -43,6 +43,8 @@ Here is a list of the supported devices (the ones marked with * have been tested
- H61A1 RGBIC Neon Rope Light 2M
- H61A2 RGBIC Neon Rope Light 5M
- H61A3 RGBIC Neon Rope Light
- H61D3 Neon Rope Light 2 3M (*)
- H61D5 Neon Rope Light 2 5M (*)
- H61A5 Neon LED Strip Light 10
- H61A8Neon Neon Rope Light 10
- H618A RGBIC Basic LED Strip Lights 5M
Expand Down Expand Up @@ -79,7 +81,6 @@ Here is a list of the supported devices (the ones marked with * have been tested
- H618F RGBIC LED Strip Lights
- H618E LED Strip Lights 22m
- H6168 TV LED Backlight

## Discovery

Discovery is done by scanning the devices in the Thing section.
Expand Down
Expand Up @@ -38,8 +38,10 @@ discovery.govee-light.H61A0 = H61A0 RGBIC Neon Rope Light 1M
discovery.govee-light.H61A1 = H61A1 RGBIC Neon Rope Light 2M
discovery.govee-light.H61A2 = H61A2 RGBIC Neon Rope Light 5M
discovery.govee-light.H61A3 = H61A3 RGBIC Neon Rope Light
discovery.govee-light.H61D3 = H61D3 Neon Rope Light 2 3m
discovery.govee-light.H61D5 = H61D5 Neon Rope Light 2 5m
discovery.govee-light.H61A5 = H61A5 Neon LED Strip Light 10
discovery.govee-light.H61A8 = H61A8Neon Neon Rope Light 10
discovery.govee-light.H61A8 = H61A8 Neon Rope Light 10
discovery.govee-light.H618A = H618A RGBIC Basic LED Strip Lights 5M
discovery.govee-light.H618C = H618C RGBIC Basic LED Strip Lights 5M
discovery.govee-light.H6117 = H6117 Dream Color LED Strip Light 10M
Expand Down
1 change: 1 addition & 0 deletions bundles/org.openhab.binding.miele/README.md
Expand Up @@ -370,6 +370,7 @@ See oven.
| 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

Expand Down
Expand Up @@ -60,6 +60,7 @@ public class MieleBindingConstants {
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");
Expand Down
Expand Up @@ -143,7 +143,8 @@ public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationPr
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);

Expand Down
Expand Up @@ -24,6 +24,7 @@
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;
Expand All @@ -47,6 +48,7 @@
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;
Expand Down Expand Up @@ -136,5 +138,11 @@ public void onApplianceExtendedStateChanged(byte[] extendedDeviceState) {
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);
}
}
Expand Up @@ -85,6 +85,8 @@ channel-type.miele.heat.label = Remaining Heat
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
Expand Down
Expand Up @@ -72,6 +72,8 @@ channel-type.miele.end.label = Sluttid
channel-type.miele.end.description = Sluttidspunkt for programmet (programmeret eller kørende)
channel-type.miele.energy-consumption.label = Energiforbrug
channel-type.miele.energy-consumption.description = Energiforbrug ved det nuværende kørende program på apparatet
channel-type.miele.failure.label = Signaler fejl
channel-type.miele.failure.description = Signalerer fejl, kontroller apparat for detaljer
channel-type.miele.finish.label = Sluttid
channel-type.miele.finish.description = Tid for at færdiggøre det kørende program på apparatet
channel-type.miele.finish.state.pattern = %1$tR
Expand All @@ -81,6 +83,10 @@ channel-type.miele.fridgestate.label = Status
channel-type.miele.fridgestate.description = Nuværende status i kølerummet
channel-type.miele.heat.label = Resterende varme
channel-type.miele.heat.description = Resterende varmeniveau for varmezonen/-pladen
channel-type.miele.info.label = Signaler information
channel-type.miele.info.description = Signalerer information, kontroller apparat for detaljer
channel-type.miele.laundry-weight.label = Tøjvægt
channel-type.miele.laundry-weight.description = Vægten af vasketøjet i maskinen
channel-type.miele.phase.label = Fase
channel-type.miele.phase.description = Nuværende fase for det kørende program på apparatet
channel-type.miele.plates.label = Plader
Expand Down
Expand Up @@ -263,4 +263,11 @@
<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>
Expand Up @@ -37,10 +37,11 @@
<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>
Expand Down
Expand Up @@ -96,6 +96,11 @@
<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>

0 comments on commit edf4eb7

Please sign in to comment.