mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Add icon translations to EZVIZ (#111532)
This commit is contained in:
parent
18e1b3bbbc
commit
7b79c21835
@ -41,7 +41,6 @@ BUTTON_ENTITIES = (
|
||||
EzvizButtonEntityDescription(
|
||||
key="ptz_up",
|
||||
translation_key="ptz_up",
|
||||
icon="mdi:pan",
|
||||
method=lambda pyezviz_client, serial, run: pyezviz_client.ptz_control(
|
||||
"UP", serial, run
|
||||
),
|
||||
@ -50,7 +49,6 @@ BUTTON_ENTITIES = (
|
||||
EzvizButtonEntityDescription(
|
||||
key="ptz_down",
|
||||
translation_key="ptz_down",
|
||||
icon="mdi:pan",
|
||||
method=lambda pyezviz_client, serial, run: pyezviz_client.ptz_control(
|
||||
"DOWN", serial, run
|
||||
),
|
||||
@ -59,7 +57,6 @@ BUTTON_ENTITIES = (
|
||||
EzvizButtonEntityDescription(
|
||||
key="ptz_left",
|
||||
translation_key="ptz_left",
|
||||
icon="mdi:pan",
|
||||
method=lambda pyezviz_client, serial, run: pyezviz_client.ptz_control(
|
||||
"LEFT", serial, run
|
||||
),
|
||||
@ -68,7 +65,6 @@ BUTTON_ENTITIES = (
|
||||
EzvizButtonEntityDescription(
|
||||
key="ptz_right",
|
||||
translation_key="ptz_right",
|
||||
icon="mdi:pan",
|
||||
method=lambda pyezviz_client, serial, run: pyezviz_client.ptz_control(
|
||||
"RIGHT", serial, run
|
||||
),
|
||||
|
32
homeassistant/components/ezviz/icons.json
Normal file
32
homeassistant/components/ezviz/icons.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"entity": {
|
||||
"button": {
|
||||
"ptz_up": {
|
||||
"default": "mdi:pan"
|
||||
},
|
||||
"ptz_down": {
|
||||
"default": "mdi:pan"
|
||||
},
|
||||
"ptz_left": {
|
||||
"default": "mdi:pan"
|
||||
},
|
||||
"ptz_right": {
|
||||
"default": "mdi:pan"
|
||||
}
|
||||
},
|
||||
"number": {
|
||||
"detection_sensibility": {
|
||||
"default": "mdi:eye"
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
"alarm_sound_mode": {
|
||||
"default": "mdi:alarm"
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"set_alarm_detection_sensibility": "mdi:motion-sensor",
|
||||
"wake_device": "mdi:sleep-off"
|
||||
}
|
||||
}
|
@ -48,7 +48,6 @@ class EzvizNumberEntityDescription(
|
||||
NUMBER_TYPE = EzvizNumberEntityDescription(
|
||||
key="detection_sensibility",
|
||||
translation_key="detection_sensibility",
|
||||
icon="mdi:eye",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
native_min_value=0,
|
||||
native_step=1,
|
||||
@ -68,8 +67,8 @@ async def async_setup_entry(
|
||||
async_add_entities(
|
||||
EzvizNumber(coordinator, camera, value, entry.entry_id)
|
||||
for camera in coordinator.data
|
||||
for capibility, value in coordinator.data[camera]["supportExt"].items()
|
||||
if capibility == NUMBER_TYPE.supported_ext
|
||||
for capability, value in coordinator.data[camera]["supportExt"].items()
|
||||
if capability == NUMBER_TYPE.supported_ext
|
||||
if value in NUMBER_TYPE.supported_ext_value
|
||||
)
|
||||
|
||||
|
@ -37,7 +37,6 @@ class EzvizSelectEntityDescription(
|
||||
SELECT_TYPE = EzvizSelectEntityDescription(
|
||||
key="alarm_sound_mod",
|
||||
translation_key="alarm_sound_mode",
|
||||
icon="mdi:alarm",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
options=["soft", "intensive", "silent"],
|
||||
supported_switch=DeviceSwitchType.ALARM_TONE.value,
|
||||
|
Loading…
x
Reference in New Issue
Block a user