Bump zwave-js-server-python to 0.18.0 (#46787)

* updates to support changes in zwave-js-server-python

* bump lib version

* use named arguments for optional args

* re-add lost commits
This commit is contained in:
Raman Gupta 2021-02-20 03:50:00 -05:00 committed by GitHub
parent 26ce316c18
commit 788134cbc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 63 additions and 27 deletions

View file

@ -125,10 +125,18 @@ class ZWaveClimate(ZWaveBaseEntity, ClimateEntity):
)
self._setpoint_values: Dict[ThermostatSetpointType, ZwaveValue] = {}
for enum in ThermostatSetpointType:
# Some devices don't include a property key so we need to check for value
# ID's, both with and without the property key
self._setpoint_values[enum] = self.get_zwave_value(
THERMOSTAT_SETPOINT_PROPERTY,
command_class=CommandClass.THERMOSTAT_SETPOINT,
value_property_key_name=enum.value,
value_property_key=enum.value.key,
value_property_key_name=enum.value.name,
add_to_watched_value_ids=True,
) or self.get_zwave_value(
THERMOSTAT_SETPOINT_PROPERTY,
command_class=CommandClass.THERMOSTAT_SETPOINT,
value_property_key_name=enum.value.name,
add_to_watched_value_ids=True,
)
# Use the first found setpoint value to always determine the temperature unit