Skip to content

Commit

Permalink
Enable use of analogue input with Shelly Plus Add-on (#16744)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Fagerholm <fabbe@paniq.net>
  • Loading branch information
ffagerho committed May 12, 2024
1 parent 1caf5ff commit 8b85ff1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,11 @@ private void updateAddonStatus(ShellySettingsStatus status, @Nullable Shelly2Dev
status.extVoltage = new ShellyExtVoltage(ds.voltmeter100.voltage);
}
if (ds.input100 != null) {
status.extDigitalInput = new ShellyExtDigitalInput(getBool(ds.input100.state));
if (ds.input100.state != null) {
status.extDigitalInput = new ShellyExtDigitalInput(getBool(ds.input100.state));
} else if (ds.input100.percent != null) {
status.extAnalogInput = new ShellyExtAnalogInput(getDouble(ds.input100.percent));
}
}
}

Expand Down

0 comments on commit 8b85ff1

Please sign in to comment.