cgtobi / netatmo_custom

This repo is a custom component from the beta version of the official HA netatmo component
MIT License
13 stars 6 forks source link

[FEATURE] Doorbell button or switch #8

Open confucius78 opened 2 years ago

confucius78 commented 2 years ago

Following our discussion on discord: feature request for a doorbell switch or button to use for automations and to display doorbell press events...

To capture the consideration of either option:

Switch would allow for the possibility to leave the entity switched on for a certain time after the doorbell was triggered Button is a more representative type compared to the physical device

I don't think either option would be too restrictive on ability to automate etc, so it is perhaps just a matter of taste.

confucius78 commented 2 years ago

To assist with development, below the event logs triggered for a single doorbell event:

`{ "event_type": "netatmo_event", "data": { "type": "missed_call", "data": { "user_id": "REDACTED", "event_type": "missed_call", "device_id": "70:ee:50:7c:75:20", "home_id": "REDACTED", "home_name": "Mijn huis", "camera_id": "70:ee:50:7c:75:20", "event_id": "6224bd964b472d67cc133fd2", "subevent_id": "a414ed9e-2383-4a38-a505-ff10eb1292a5", "snapshot_url": "https://netatmocameraimage.blob.core.windows.net/production/***REDACTED", "vignette_url": "https://netatmocameraimage.blob.core.windows.net/production/REDACTED***", "session_id": "9112c8a7-1948-4649-8add-63618a18188a", "push_type": "NDB-missed_call" } }, "origin": "LOCAL", "time_fired": "2022-03-06T13:57:15.641720+00:00", "context": { "id": "530da8002677f9efcc968071b73db9aa", "parent_id": null, "user_id": null } }

Event 1 fired 2:56 PM:

{ "event_type": "netatmo_event", "data": { "type": "incoming_call", "data": { "user_id": "REDACTED", "event_type": "incoming_call", "device_id": "70:ee:50:7c:75:20", "home_id": "REDACTED", "home_name": "Mijn huis", "camera_id": "70:ee:50:7c:75:20", "event_id": "6224bd964b472d67cc133fd2", "subevent_id": "a414ed9e-2383-4a38-a505-ff10eb1292a5", "snapshot_url": "https://netatmocameraimage.blob.core.windows.net/production/***REDACTED", "vignette_url": "https://netatmocameraimage.blob.core.windows.net/production/REDACTED***", "session_id": "9112c8a7-1948-4649-8add-63618a18188a", "push_type": "NDB-incoming_call" } }, "origin": "LOCAL", "time_fired": "2022-03-06T13:56:38.742227+00:00", "context": { "id": "cbe954483d08bf015c47c8ec0802bc58", "parent_id": null, "user_id": null } }

Event 0 fired 2:56 PM:

{ "event_type": "netatmo_event", "data": { "type": "None", "data": { "user_id": "REDACTED", "session_id": "9112c8a7-1948-4649-8add-63618a18188a", "data": { "type": "offer" }, "device_id": "70:ee:50:7c:75:20", "home_id": "REDACTED", "push_type": "NDB-rtc" } }, "origin": "LOCAL", "time_fired": "2022-03-06T13:56:38.093623+00:00", "context": { "id": "c4d34ed03c63bbf29f4635f7300e4128", "parent_id": null, "user_id": null } } `