Add icon translations to Reolink (#112208)

* Add icon translations to Reolink

* Fix

* Update homeassistant/components/reolink/icons.json

Co-authored-by: starkillerOG <starkiller.og@gmail.com>

* Update homeassistant/components/reolink/icons.json

---------

Co-authored-by: starkillerOG <starkiller.og@gmail.com>
This commit is contained in:
Joost Lekkerkerker 2024-03-06 11:02:13 +01:00 committed by GitHub
parent 2599252600
commit 09b1b40833
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 260 additions and 89 deletions

View file

@ -52,7 +52,6 @@ SWITCH_ENTITIES = (
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),
@ -62,7 +61,6 @@ SWITCH_ENTITIES = (
key="record_audio",
cmd_key="GetEnc",
translation_key="record_audio",
icon="mdi:microphone",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "audio"),
value=lambda api, ch: api.audio_record(ch),
@ -72,7 +70,6 @@ SWITCH_ENTITIES = (
key="siren_on_event",
cmd_key="GetAudioAlarm",
translation_key="siren_on_event",
icon="mdi:alarm-light",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "siren"),
value=lambda api, ch: api.audio_alarm_enabled(ch),
@ -82,7 +79,6 @@ SWITCH_ENTITIES = (
key="auto_tracking",
cmd_key="GetAiCfg",
translation_key="auto_tracking",
icon="mdi:target-account",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "auto_track"),
value=lambda api, ch: api.auto_track_enabled(ch),
@ -92,7 +88,6 @@ SWITCH_ENTITIES = (
key="auto_focus",
cmd_key="GetAutoFocus",
translation_key="auto_focus",
icon="mdi:focus-field",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "auto_focus"),
value=lambda api, ch: api.autofocus_enabled(ch),
@ -102,7 +97,6 @@ SWITCH_ENTITIES = (
key="gaurd_return",
cmd_key="GetPtzGuard",
translation_key="gaurd_return",
icon="mdi:crosshairs-gps",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "ptz_guard"),
value=lambda api, ch: api.ptz_guard_enabled(ch),
@ -111,7 +105,6 @@ SWITCH_ENTITIES = (
ReolinkSwitchEntityDescription(
key="ptz_patrol",
translation_key="ptz_patrol",
icon="mdi:map-marker-path",
supported=lambda api, ch: api.supported(ch, "ptz_patrol"),
value=lambda api, ch: None,
method=lambda api, ch, value: api.ctrl_ptz_patrol(ch, value),
@ -120,7 +113,6 @@ SWITCH_ENTITIES = (
key="email",
cmd_key="GetEmail",
translation_key="email",
icon="mdi:email",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "email") and api.is_nvr,
value=lambda api, ch: api.email_enabled(ch),
@ -130,7 +122,6 @@ SWITCH_ENTITIES = (
key="ftp_upload",
cmd_key="GetFtp",
translation_key="ftp_upload",
icon="mdi:swap-horizontal",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "ftp") and api.is_nvr,
value=lambda api, ch: api.ftp_enabled(ch),
@ -140,7 +131,6 @@ SWITCH_ENTITIES = (
key="push_notifications",
cmd_key="GetPush",
translation_key="push_notifications",
icon="mdi:message-badge",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "push") and api.is_nvr,
value=lambda api, ch: api.push_enabled(ch),
@ -150,7 +140,6 @@ SWITCH_ENTITIES = (
key="record",
cmd_key="GetRec",
translation_key="record",
icon="mdi:record-rec",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "recording") and api.is_nvr,
value=lambda api, ch: api.recording_enabled(ch),
@ -160,7 +149,6 @@ SWITCH_ENTITIES = (
key="buzzer",
cmd_key="GetBuzzerAlarmV20",
translation_key="buzzer",
icon="mdi:room-service",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "buzzer") and api.is_nvr,
value=lambda api, ch: api.buzzer_enabled(ch),
@ -170,7 +158,6 @@ SWITCH_ENTITIES = (
key="doorbell_button_sound",
cmd_key="GetAudioCfg",
translation_key="doorbell_button_sound",
icon="mdi:volume-high",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "doorbell_button_sound"),
value=lambda api, ch: api.doorbell_button_sound(ch),
@ -180,7 +167,6 @@ SWITCH_ENTITIES = (
key="hdr",
cmd_key="GetIsp",
translation_key="hdr",
icon="mdi:hdr",
entity_category=EntityCategory.CONFIG,
entity_registry_enabled_default=False,
supported=lambda api, ch: api.supported(ch, "HDR"),
@ -194,7 +180,6 @@ NVR_SWITCH_ENTITIES = (
key="email",
cmd_key="GetEmail",
translation_key="email",
icon="mdi:email",
entity_category=EntityCategory.CONFIG,
supported=lambda api: api.supported(None, "email"),
value=lambda api: api.email_enabled(),
@ -204,7 +189,6 @@ NVR_SWITCH_ENTITIES = (
key="ftp_upload",
cmd_key="GetFtp",
translation_key="ftp_upload",
icon="mdi:swap-horizontal",
entity_category=EntityCategory.CONFIG,
supported=lambda api: api.supported(None, "ftp"),
value=lambda api: api.ftp_enabled(),
@ -214,7 +198,6 @@ NVR_SWITCH_ENTITIES = (
key="push_notifications",
cmd_key="GetPush",
translation_key="push_notifications",
icon="mdi:message-badge",
entity_category=EntityCategory.CONFIG,
supported=lambda api: api.supported(None, "push"),
value=lambda api: api.push_enabled(),
@ -224,7 +207,6 @@ NVR_SWITCH_ENTITIES = (
key="record",
cmd_key="GetRec",
translation_key="record",
icon="mdi:record-rec",
entity_category=EntityCategory.CONFIG,
supported=lambda api: api.supported(None, "recording"),
value=lambda api: api.recording_enabled(),