@@ -64,6 +64,8 @@ async def test_setup_component_with_webhook(
6464
6565 camera_entity_indoor = "camera.hall"
6666 camera_entity_outdoor = "camera.front"
67+
68+ # Test indoor camera events
6769 assert hass .states .get (camera_entity_indoor ).state == "streaming"
6870 response = {
6971 "event_type" : "off" ,
@@ -87,6 +89,31 @@ async def test_setup_component_with_webhook(
8789
8890 assert hass .states .get (camera_entity_indoor ).state == "streaming"
8991
92+ # Test outdoor camera events - not yet supported
93+ assert hass .states .get (camera_entity_outdoor ).state == "streaming"
94+ response = {
95+ "event_type" : "off" ,
96+ "device_id" : "12:34:56:10:b9:0e" ,
97+ "camera_id" : "12:34:56:10:b9:0e" ,
98+ "event_id" : "601dce1560abca1ebad9b723" ,
99+ "push_type" : "NOCamera-off" ,
100+ }
101+ await simulate_webhook (hass , webhook_id , response )
102+
103+ # The NOCamera-off push_type is not yet supported (assert should be "idle" when supported)
104+ assert hass .states .get (camera_entity_outdoor ).state == "streaming"
105+
106+ response = {
107+ "event_type" : "on" ,
108+ "device_id" : "12:34:56:10:b9:0e" ,
109+ "camera_id" : "12:34:56:10:b9:0e" ,
110+ "event_id" : "646227f1dc0dfa000ec5f350" ,
111+ "push_type" : "NOCamera-on" ,
112+ }
113+ await simulate_webhook (hass , webhook_id , response )
114+
115+ assert hass .states .get (camera_entity_outdoor ).state == "streaming"
116+
90117 response = {
91118 "event_type" : "light_mode" ,
92119 "device_id" : "12:34:56:10:b9:0e" ,
0 commit comments