1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

[Climate] Hive Add water heater Component post the refresh of the climate component. (#25148)

* climate_water_heater

* updated names

* Update water_heater

* Update requirements

* Updated reqirements

* Version update

* updated Versiojn

* Update device list

* Removed unused Attributes
This commit is contained in:
Khole
2019-07-14 22:54:07 +01:00
committed by Pascal Vizeli
parent 0a8b68fd4d
commit bcf85a0df1
5 changed files with 122 additions and 6 deletions

View File

@@ -45,11 +45,14 @@ class HiveClimateEntity(ClimateDevice):
"""Initialize the Climate device."""
self.node_id = hivedevice["Hive_NodeID"]
self.node_name = hivedevice["Hive_NodeName"]
self.device_type = hivedevice["HA_DeviceType"]
self.thermostat_node_id = hivedevice["Thermostat_NodeID"]
self.session = hivesession
self.attributes = {}
self.data_updatesource = 'Heating.{}'.format(self.node_id)
self._unique_id = '{}-Heating'.format(self.node_id)
self.data_updatesource = '{}.{}'.format(
self.device_type, self.node_id)
self._unique_id = '{}-{}'.format(self.node_id, self.device_type)
self.session.entities.append(self)
@property
def unique_id(self):
@@ -73,7 +76,7 @@ class HiveClimateEntity(ClimateDevice):
def handle_update(self, updatesource):
"""Handle the new update request."""
if 'Heating.{}'.format(self.node_id) not in updatesource:
if '{}.{}'.format(self.device_type, self.node_id) not in updatesource:
self.schedule_update_ha_state()
@property