Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wiz] Correct units for RSSI #17867

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ private synchronized void updateStatesFromParams(final WizSyncState receivedPara
strength = 4;
}
updateDeviceState(CHANNEL_SIGNAL_STRENGTH, new DecimalType(strength));
updateDeviceState(CHANNEL_RSSI, new QuantityType<>(receivedParam.rssi, Units.DECIBEL));
updateDeviceState(CHANNEL_RSSI, new QuantityType<>(receivedParam.rssi, Units.DECIBEL_MILLIWATTS));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<channel id="last-update" typeId="last-update"/>
<channel id="rssi" typeId="rssi"/>
</channels>
<properties>
<property name="thingTypeVersion">1</property>
</properties>
<config-description-ref uri="thing-type:wiz:device"/>
</thing-type>

Expand All @@ -34,6 +37,9 @@
<channel id="last-update" typeId="last-update"/>
<channel id="rssi" typeId="rssi"/>
</channels>
<properties>
<property name="thingTypeVersion">1</property>
</properties>
<config-description-ref uri="thing-type:wiz:device"/>
</thing-type>

Expand All @@ -49,6 +55,9 @@
<channel id="last-update" typeId="last-update"/>
<channel id="rssi" typeId="rssi"/>
</channels>
<properties>
<property name="thingTypeVersion">1</property>
</properties>
<config-description-ref uri="thing-type:wiz:device"/>
</thing-type>

Expand All @@ -62,6 +71,9 @@
<channel id="last-update" typeId="last-update"/>
<channel id="rssi" typeId="rssi"/>
</channels>
<properties>
<property name="thingTypeVersion">1</property>
</properties>
<config-description-ref uri="thing-type:wiz:device"/>
</thing-type>

Expand All @@ -78,6 +90,9 @@
<channel id="last-update" typeId="last-update"/>
<channel id="rssi" typeId="rssi"/>
</channels>
<properties>
<property name="thingTypeVersion">1</property>
</properties>
<config-description-ref uri="thing-type:wiz:device"/>
</thing-type>

Expand All @@ -90,6 +105,9 @@
<channel-group id="light" typeId="dimmable-light"/>
<channel-group id="fan" typeId="fan-group"/>
</channel-groups>
<properties>
<property name="thingTypeVersion">1</property>
</properties>
<config-description-ref uri="thing-type:wiz:device"/>
</thing-type>

Expand Down Expand Up @@ -185,7 +203,7 @@
</channel-type>

<channel-type id="rssi" advanced="true">
<item-type unitHint="dB">Number:Dimensionless</item-type>
<item-type unitHint="dBm">Number:Power</item-type>
<label>RSSI</label>
<description>WiFi Received Signal Strength Indicator</description>
<category>QualityOfService</category>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">

<thing-type uid="wiz:color-bulb">
<instruction-set targetVersion="1">
<update-channel id="rssi">
<type>wiz:rssi</type>
</update-channel>
</instruction-set>
</thing-type>

<thing-type uid="wiz:tunable-bulb">
<instruction-set targetVersion="1">
<update-channel id="rssi">
<type>wiz:rssi</type>
</update-channel>
</instruction-set>
</thing-type>

<thing-type uid="wiz:dimmable-bulb">
<instruction-set targetVersion="1">
<update-channel id="rssi">
<type>wiz:rssi</type>
</update-channel>
</instruction-set>
</thing-type>

<thing-type uid="wiz:plug">
<instruction-set targetVersion="1">
<update-channel id="rssi">
<type>wiz:rssi</type>
</update-channel>
</instruction-set>
</thing-type>

<thing-type uid="wiz:fan">
<instruction-set targetVersion="1">
<update-channel id="rssi">
<type>wiz:rssi</type>
</update-channel>
</instruction-set>
</thing-type>

<thing-type uid="wiz:fan-with-dimmable-bulb">
<instruction-set targetVersion="1">
<update-channel id="rssi">
<type>wiz:rssi</type>
</update-channel>
</instruction-set>
</thing-type>

</update:update-descriptions>