Add Reolink baby crying binary sensor (#134290)

* Add baby crying detection

* Bump reolink-aio to 0.11.6
pull/134372/head
starkillerOG 2024-12-31 22:27:01 +01:00 committed by GitHub
parent 6c47f03d17
commit 1e70a0060b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 0 deletions

View File

@ -100,6 +100,13 @@ BINARY_PUSH_SENSORS = (
value=lambda api, ch: api.visitor_detected(ch),
supported=lambda api, ch: api.is_doorbell(ch),
),
ReolinkBinarySensorEntityDescription(
key="cry",
cmd_id=33,
translation_key="cry",
value=lambda api, ch: api.ai_detected(ch, "cry"),
supported=lambda api, ch: api.ai_supported(ch, "cry"),
),
)
BINARY_SENSORS = (

View File

@ -43,6 +43,12 @@
"on": "mdi:motion-sensor"
}
},
"cry": {
"default": "mdi:emoticon-happy-outline",
"state": {
"on": "mdi:emoticon-cry-outline"
}
},
"sleep": {
"default": "mdi:sleep-off",
"state": {

View File

@ -215,6 +215,13 @@
"on": "[%key:component::binary_sensor::entity_component::gas::state::on%]"
}
},
"cry": {
"name": "Baby crying",
"state": {
"off": "[%key:component::binary_sensor::entity_component::gas::state::off%]",
"on": "[%key:component::binary_sensor::entity_component::gas::state::on%]"
}
},
"motion_lens_0": {
"name": "Motion lens 0",
"state": {