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:
Khole authored and Martin Hjelmare committed 2018-04-16 21:00:13 +02:00
1 parent 595600dea5
commit e0c5b44994
7 files changed
+72 -7

No files matched your search

@@ -32,6 +32,7 @@ class HiveBinarySensorEntity(BinarySensorDevice):
self.device_type = hivedevice["HA_DeviceType"]
self.node_device_type = hivedevice["Hive_DeviceType"]
self.session = hivesession
self.attributes = {}
self.data_updatesource = '{}.{}'.format(self.device_type,
self.node_id)
@@ -52,6 +53,11 @@ class HiveBinarySensorEntity(BinarySensorDevice):
"""Return the name of the binary sensor."""
return self.node_name
@property
def device_state_attributes(self):
"""Show Device Attributes."""
return self.attributes
@property
def is_on(self):
"""Return true if the binary sensor is on."""
@@ -61,3 +67,5 @@ class HiveBinarySensorEntity(BinarySensorDevice):
def update(self):
"""Update all Node data from Hive."""
self.session.core.update_data(self.node_id)
self.attributes = self.session.attributes.state_attributes(
self.node_id)