stas-demydiuk / domoticz-zigbee2mqtt-plugin

zigbee2mqtt plugin for domoticz
MIT License
136 stars 98 forks source link

Fix creation of Hive SLR2 features #723

Closed russdan closed 2 years ago

russdan commented 2 years ago

Addresses issues when Hive SLR2 controller features are created, as documented in Bug #719:

  1. adapter.py: Binary device temperature_setpoint_hold doesn't get created and generates an error, so add in defintion of this feature.
  2. adapter.py: Creation of setpoint numeric features assumes they have a unit attribute which Hive temperature_setpoint_hold_duration feature does not have (unit attribute is not present) - this causes no features to be added for all devices after this point as the plugin abends, so add a try/except check to see if we can access the unit feature and if not create a CustomSensor not a SetPoint.
  3. devices\devices.py: Hive SLR2 has heat and water endpoints but currently devices.py creates a pair of features with the same names (so temperature_setpoint_hold_heat and temperature_setpoint_hold_water both get created as temperature_setpoint_hold so we cannot differentiate which feature is for which endpoint) - add in an option to create the feature suffix using self.value_key which then creates these with the full feature name.