Remove Yeelight model to device type mapping (#36658)

pull/36720/head
zewelor 2020-06-12 14:51:48 +02:00 committed by GitHub
parent 5595ef0783
commit 871afd2bf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 23 deletions

View File

@ -127,25 +127,6 @@ YEELIGHT_COLOR_EFFECT_LIST = [
*YEELIGHT_MONO_EFFECT_LIST,
]
MODEL_TO_DEVICE_TYPE = {
"mono": BulbType.White,
"mono1": BulbType.White,
"color": BulbType.Color,
"color1": BulbType.Color,
"color2": BulbType.Color,
"strip1": BulbType.Color,
"bslamp1": BulbType.Color,
"bslamp2": BulbType.Color,
"RGBW": BulbType.Color,
"lamp1": BulbType.WhiteTemp,
"ceiling1": BulbType.WhiteTemp,
"ceiling2": BulbType.WhiteTemp,
"ceiling3": BulbType.WhiteTemp,
"ceiling4": BulbType.WhiteTempMood,
"ceiling10": BulbType.WhiteTempMood,
"ceiling13": BulbType.WhiteTemp,
}
EFFECTS_MAP = {
EFFECT_DISCO: yee_transitions.disco,
EFFECT_TEMP: yee_transitions.temp,
@ -274,10 +255,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
lights = []
if device.model:
device_type = MODEL_TO_DEVICE_TYPE.get(device.model, None)
else:
device_type = device.type
device_type = device.type
def _lights_setup_helper(klass):
lights.append(klass(device, custom_effects=custom_effects))