Fix brightness_pct in light device turn_on action (#32787)
This commit is contained in:
1 parent
b5c8b5b91f
commit
e666485ea9
2 files changed
+9
-9
No files matched your search
@@ -126,7 +126,7 @@ async def test_get_action_capabilities_brightness(hass, device_reg, entity_reg):
|
||||
expected_capabilities = {
|
||||
"extra_fields": [
|
||||
{
|
||||
"name": "brightness",
|
||||
"name": "brightness_pct",
|
||||
"optional": True,
|
||||
"type": "integer",
|
||||
"valueMax": 100,
|
||||
@@ -218,7 +218,7 @@ async def test_action(hass, calls):
|
||||
"device_id": "",
|
||||
"entity_id": ent1.entity_id,
|
||||
"type": "turn_on",
|
||||
"brightness": 75,
|
||||
"brightness_pct": 75,
|
||||
},
|
||||
},
|
||||
]
|
||||
@@ -273,11 +273,11 @@ async def test_action(hass, calls):
|
||||
|
||||
assert len(turn_on_calls) == 3
|
||||
assert turn_on_calls[2].data["entity_id"] == ent1.entity_id
|
||||
assert turn_on_calls[2].data["brightness"] == 75
|
||||
assert turn_on_calls[2].data["brightness_pct"] == 75
|
||||
|
||||
hass.bus.async_fire("test_on")
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert len(turn_on_calls) == 4
|
||||
assert turn_on_calls[3].data["entity_id"] == ent1.entity_id
|
||||
assert "brightness" not in turn_on_calls[3].data
|
||||
assert "brightness_pct" not in turn_on_calls[3].data
|
||||
Reference in new issue
Block a user