Add Hue device info (#16267)
* Add Hue device info * Set with tuples * Fix tests
This commit is contained in:
1 parent
7751dd7535
commit
867d17b03d
3 files changed
+77
-6
No files matched your search
@@ -285,6 +285,25 @@ class HueLight(Light):
|
||||
"""Return the list of supported effects."""
|
||||
return [EFFECT_COLORLOOP, EFFECT_RANDOM]
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
"""Return the device info."""
|
||||
if self.light.type in ('LightGroup', 'Room'):
|
||||
return None
|
||||
|
||||
return {
|
||||
'identifiers': {
|
||||
(hue.DOMAIN, self.unique_id)
|
||||
},
|
||||
'name': self.name,
|
||||
'manufacturer': self.light.manufacturername,
|
||||
# productname added in Hue Bridge API 1.24
|
||||
# (published 03/05/2018)
|
||||
'model': self.light.productname or self.light.modelid,
|
||||
# Not yet exposed as properties in aiohue
|
||||
'sw_version': self.light.raw['swversion'],
|
||||
}
|
||||
|
||||
async def async_turn_on(self, **kwargs):
|
||||
"""Turn the specified or all lights on."""
|
||||
command = {'on': True}
|
||||
|
||||
Reference in new issue
Block a user