mirror of
https://github.com/elisspace/core.git
synced 2026-09-17 16:26:23 +00:00
Add partial mobile app sensor validation (#36433)
This commit is contained in:
@@ -57,13 +57,18 @@ async def test_sensor(hass, create_registrations, webhook_client):
|
||||
"state": 123,
|
||||
"type": "sensor",
|
||||
"unique_id": "battery_state",
|
||||
}
|
||||
},
|
||||
# This invalid data should not invalidate whole request
|
||||
{"type": "sensor", "unique_id": "invalid_state", "invalid": "data"},
|
||||
],
|
||||
},
|
||||
)
|
||||
|
||||
assert update_resp.status == 200
|
||||
|
||||
json = await update_resp.json()
|
||||
assert json["invalid_state"]["success"] is False
|
||||
|
||||
updated_entity = hass.states.get("sensor.test_1_battery_state")
|
||||
assert updated_entity.state == "123"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user