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
@@ -34,6 +34,7 @@ class HiveDeviceLight(Light):
|
||||
self.device_type = hivedevice["HA_DeviceType"]
|
||||
self.light_device_type = hivedevice["Hive_Light_DeviceType"]
|
||||
self.session = hivesession
|
||||
self.attributes = {}
|
||||
self.data_updatesource = '{}.{}'.format(self.device_type,
|
||||
self.node_id)
|
||||
self.session.entities.append(self)
|
||||
@@ -48,6 +49,11 @@ class HiveDeviceLight(Light):
|
||||
"""Return the display name of this light."""
|
||||
return self.node_name
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Show Device Attributes."""
|
||||
return self.attributes
|
||||
|
||||
@property
|
||||
def brightness(self):
|
||||
"""Brightness of the light (an integer in the range 1-255)."""
|
||||
@@ -136,3 +142,5 @@ class HiveDeviceLight(Light):
|
||||
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)
|
||||
Reference in new issue
Block a user