Hive R3 update (#13357)
* Rebase * Update version number to 0.2.14 * Remove Blank Line * Added period to docstring * Update Tox Fix * Removed Lines
This commit is contained in:
1 parent
595600dea5
commit
e0c5b44994
7 files changed
+72
-7
No files matched your search
@@ -38,7 +38,10 @@ class HiveClimateEntity(ClimateDevice):
|
||||
self.node_id = hivedevice["Hive_NodeID"]
|
||||
self.node_name = hivedevice["Hive_NodeName"]
|
||||
self.device_type = hivedevice["HA_DeviceType"]
|
||||
if self.device_type == "Heating":
|
||||
self.thermostat_node_id = hivedevice["Thermostat_NodeID"]
|
||||
self.session = hivesession
|
||||
self.attributes = {}
|
||||
self.data_updatesource = '{}.{}'.format(self.device_type,
|
||||
self.node_id)
|
||||
|
||||
@@ -71,6 +74,11 @@ class HiveClimateEntity(ClimateDevice):
|
||||
friendly_name = "Hot Water"
|
||||
return friendly_name
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Show Device Attributes."""
|
||||
return self.attributes
|
||||
|
||||
@property
|
||||
def temperature_unit(self):
|
||||
"""Return the unit of measurement."""
|
||||
@@ -175,4 +183,9 @@ class HiveClimateEntity(ClimateDevice):
|
||||
|
||||
def update(self):
|
||||
"""Update all Node data from Hive."""
|
||||
node = self.node_id
|
||||
if self.device_type == "Heating":
|
||||
node = self.thermostat_node_id
|
||||
|
||||
self.session.core.update_data(self.node_id)
|
||||
self.attributes = self.session.attributes.state_attributes(node)
|
||||
Reference in new issue
Block a user