* Emulated Hue: changed the reported fallback device-type to fix Alexa compatibility issues (#30013) * Emulated Hue: updated tests (#30013)
This commit is contained in:
parent
7e9507833b
commit
b22dfa119b
2 changed files with 5 additions and 4 deletions
|
@ -704,9 +704,10 @@ def entity_to_json(config, entity):
|
||||||
retval["modelid"] = "HASS123"
|
retval["modelid"] = "HASS123"
|
||||||
retval["state"].update({HUE_API_STATE_BRI: state[STATE_BRIGHTNESS]})
|
retval["state"].update({HUE_API_STATE_BRI: state[STATE_BRIGHTNESS]})
|
||||||
else:
|
else:
|
||||||
# On/off light (Zigbee Device ID: 0x0000)
|
# On/off plug-in unit (Zigbee Device ID: 0x0000)
|
||||||
# Supports groups, scenes and on/off control
|
# Supports groups and on/off control
|
||||||
retval["type"] = "On/off light"
|
# Used for compatibility purposes with Alexa instead of "On/off light"
|
||||||
|
retval["type"] = "On/off plug-in unit"
|
||||||
retval["modelid"] = "HASS321"
|
retval["modelid"] = "HASS321"
|
||||||
|
|
||||||
return retval
|
return retval
|
||||||
|
|
|
@ -238,7 +238,7 @@ async def test_light_without_brightness_supported(hass_hue, hue_client):
|
||||||
)
|
)
|
||||||
|
|
||||||
assert light_without_brightness_json["state"][HUE_API_STATE_ON] is True
|
assert light_without_brightness_json["state"][HUE_API_STATE_ON] is True
|
||||||
assert light_without_brightness_json["type"] == "On/off light"
|
assert light_without_brightness_json["type"] == "On/off plug-in unit"
|
||||||
|
|
||||||
|
|
||||||
async def test_light_without_brightness_can_be_turned_off(hass_hue, hue_client):
|
async def test_light_without_brightness_can_be_turned_off(hass_hue, hue_client):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue