mirror of
https://github.com/home-assistant/core.git
synced 2026-04-20 08:29:39 +02:00
Add Netatmo outdoor camera test (#156740)
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user