Skip to content

Commit

Permalink
Add HDR switch to Reolink (#103550)
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Nov 8, 2023
1 parent 22fa33c commit a51bbe9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions homeassistant/components/reolink/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@
},
"doorbell_button_sound": {
"name": "Doorbell button sound"
},
"hdr": {
"name": "HDR"
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions homeassistant/components/reolink/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ class ReolinkNVRSwitchEntityDescription(
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 = (
Expand Down

0 comments on commit a51bbe9

Please sign in to comment.