Add Netatmo outdoor camera test (#156740)

This commit is contained in:
Zoltán Farkasdi
2025-12-02 15:01:47 +01:00
committed by GitHub
parent 29631a2c5a
commit e2acf30637

View File

@@ -64,6 +64,8 @@ async def test_setup_component_with_webhook(
camera_entity_indoor = "camera.hall"
camera_entity_outdoor = "camera.front"
# Test indoor camera events
assert hass.states.get(camera_entity_indoor).state == "streaming"
response = {
"event_type": "off",
@@ -87,6 +89,31 @@ async def test_setup_component_with_webhook(
assert hass.states.get(camera_entity_indoor).state == "streaming"
# Test outdoor camera events - not yet supported
assert hass.states.get(camera_entity_outdoor).state == "streaming"
response = {
"event_type": "off",
"device_id": "12:34:56:10:b9:0e",
"camera_id": "12:34:56:10:b9:0e",
"event_id": "601dce1560abca1ebad9b723",
"push_type": "NOCamera-off",
}
await simulate_webhook(hass, webhook_id, response)
# The NOCamera-off push_type is not yet supported (assert should be "idle" when supported)
assert hass.states.get(camera_entity_outdoor).state == "streaming"
response = {
"event_type": "on",
"device_id": "12:34:56:10:b9:0e",
"camera_id": "12:34:56:10:b9:0e",
"event_id": "646227f1dc0dfa000ec5f350",
"push_type": "NOCamera-on",
}
await simulate_webhook(hass, webhook_id, response)
assert hass.states.get(camera_entity_outdoor).state == "streaming"
response = {
"event_type": "light_mode",
"device_id": "12:34:56:10:b9:0e",