Reolink change ir to switch (#105916)
* Change IR from light to switch * Remove old entity * Add test * Apply suggestions from code review Co-authored-by: Jan-Philipp Benecke <github@bnck.me> --------- Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
This commit is contained in:
parent
3e50ca6cda
commit
253182c650
5 changed files with 58 additions and 15 deletions
|
@ -48,6 +48,16 @@ class ReolinkNVRSwitchEntityDescription(
|
|||
|
||||
|
||||
SWITCH_ENTITIES = (
|
||||
ReolinkSwitchEntityDescription(
|
||||
key="ir_lights",
|
||||
cmd_key="GetIrLights",
|
||||
translation_key="ir_lights",
|
||||
icon="mdi:led-off",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
supported=lambda api, ch: api.supported(ch, "ir_lights"),
|
||||
value=lambda api, ch: api.ir_enabled(ch),
|
||||
method=lambda api, ch, value: api.set_ir_lights(ch, value),
|
||||
),
|
||||
ReolinkSwitchEntityDescription(
|
||||
key="record_audio",
|
||||
cmd_key="GetEnc",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue