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:
starkillerOG 2023-12-18 11:13:20 +01:00 committed by GitHub
parent 3e50ca6cda
commit 253182c650
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 15 deletions

View file

@ -50,16 +50,6 @@ LIGHT_ENTITIES = (
get_brightness_fn=lambda api, ch: api.whiteled_brightness(ch),
set_brightness_fn=lambda api, ch, value: api.set_whiteled(ch, brightness=value),
),
ReolinkLightEntityDescription(
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"),
is_on_fn=lambda api, ch: api.ir_enabled(ch),
turn_on_off_fn=lambda api, ch, value: api.set_ir_lights(ch, value),
),
ReolinkLightEntityDescription(
key="status_led",
cmd_key="GetPowerLed",