Add HDR switch to Reolink (#103550)

This commit is contained in:
starkillerOG 2023-11-08 01:11:44 +01:00 committed by GitHub
parent 22fa33ce7a
commit a51bbe9a66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -309,6 +309,9 @@
},
"doorbell_button_sound": {
"name": "Doorbell button sound"
},
"hdr": {
"name": "HDR"
}
}
}

View file

@ -152,6 +152,16 @@ SWITCH_ENTITIES = (
value=lambda api, ch: api.doorbell_button_sound(ch),
method=lambda api, ch, value: api.set_volume(ch, doorbell_button_sound=value),
),
ReolinkSwitchEntityDescription(
key="hdr",
translation_key="hdr",
icon="mdi:hdr",
entity_category=EntityCategory.CONFIG,
entity_registry_enabled_default=False,
supported=lambda api, ch: api.supported(ch, "HDR"),
value=lambda api, ch: api.HDR_on(ch) is True,
method=lambda api, ch, value: api.set_HDR(ch, value),
),
)
NVR_SWITCH_ENTITIES = (