mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add basic support of the Philips Zhirui desk lamp (philips.light.mono1) (#17258)
This commit is contained in:
parent
882c4b73ae
commit
757ba3b60e
@ -39,7 +39,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||||||
'philips.light.zyceiling',
|
'philips.light.zyceiling',
|
||||||
'philips.light.bulb',
|
'philips.light.bulb',
|
||||||
'philips.light.candle',
|
'philips.light.candle',
|
||||||
'philips.light.candle2']),
|
'philips.light.candle2',
|
||||||
|
'philips.light.mono1']),
|
||||||
})
|
})
|
||||||
|
|
||||||
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.41']
|
REQUIREMENTS = ['python-miio==0.4.2', 'construct==2.9.41']
|
||||||
@ -157,6 +158,12 @@ async def async_setup_platform(hass, config, async_add_entities,
|
|||||||
device = XiaomiPhilipsBulb(name, light, model, unique_id)
|
device = XiaomiPhilipsBulb(name, light, model, unique_id)
|
||||||
devices.append(device)
|
devices.append(device)
|
||||||
hass.data[DATA_KEY][host] = device
|
hass.data[DATA_KEY][host] = device
|
||||||
|
elif model == 'philips.light.mono1':
|
||||||
|
from miio import PhilipsBulb
|
||||||
|
light = PhilipsBulb(host, token)
|
||||||
|
device = XiaomiPhilipsGenericLight(name, light, model, unique_id)
|
||||||
|
devices.append(device)
|
||||||
|
hass.data[DATA_KEY][host] = device
|
||||||
else:
|
else:
|
||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
'Unsupported device found! Please create an issue at '
|
'Unsupported device found! Please create an issue at '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user