mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Add icon translations to Ring (#112212)
* Add icon translations to Ring * Add icon translations to Ring
This commit is contained in:
parent
85aedbc200
commit
a3a758bd17
32
homeassistant/components/ring/icons.json
Normal file
32
homeassistant/components/ring/icons.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"last_activity": {
|
||||
"default": "mdi:history"
|
||||
},
|
||||
"last_ding": {
|
||||
"default": "mdi:history"
|
||||
},
|
||||
"last_motion": {
|
||||
"default": "mdi:history"
|
||||
},
|
||||
"volume": {
|
||||
"default": "mdi:bell-ring"
|
||||
},
|
||||
"wifi_signal_category": {
|
||||
"default": "mdi:wifi"
|
||||
},
|
||||
"wifi_signal_strength": {
|
||||
"default": "mdi:wifi"
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"siren": {
|
||||
"default": "mdi:alarm-bell"
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"update": "mdi:refresh"
|
||||
}
|
||||
}
|
@ -171,7 +171,6 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = (
|
||||
key="last_activity",
|
||||
translation_key="last_activity",
|
||||
category=["doorbots", "authorized_doorbots", "stickup_cams"],
|
||||
icon="mdi:history",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
cls=HistoryRingSensor,
|
||||
),
|
||||
@ -179,7 +178,6 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = (
|
||||
key="last_ding",
|
||||
translation_key="last_ding",
|
||||
category=["doorbots", "authorized_doorbots"],
|
||||
icon="mdi:history",
|
||||
kind="ding",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
cls=HistoryRingSensor,
|
||||
@ -188,7 +186,6 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = (
|
||||
key="last_motion",
|
||||
translation_key="last_motion",
|
||||
category=["doorbots", "authorized_doorbots", "stickup_cams"],
|
||||
icon="mdi:history",
|
||||
kind="motion",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
cls=HistoryRingSensor,
|
||||
@ -197,14 +194,12 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = (
|
||||
key="volume",
|
||||
translation_key="volume",
|
||||
category=["chimes", "doorbots", "authorized_doorbots", "stickup_cams"],
|
||||
icon="mdi:bell-ring",
|
||||
cls=RingSensor,
|
||||
),
|
||||
RingSensorEntityDescription(
|
||||
key="wifi_signal_category",
|
||||
translation_key="wifi_signal_category",
|
||||
category=["chimes", "doorbots", "authorized_doorbots", "stickup_cams"],
|
||||
icon="mdi:wifi",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
cls=HealthDataRingSensor,
|
||||
),
|
||||
@ -213,7 +208,6 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = (
|
||||
translation_key="wifi_signal_strength",
|
||||
category=["chimes", "doorbots", "authorized_doorbots", "stickup_cams"],
|
||||
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
icon="mdi:wifi",
|
||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
cls=HealthDataRingSensor,
|
||||
|
@ -19,8 +19,6 @@ from .entity import RingEntity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SIREN_ICON = "mdi:alarm-bell"
|
||||
|
||||
|
||||
# It takes a few seconds for the API to correctly return an update indicating
|
||||
# that the changes have been made. Once we request a change (i.e. a light
|
||||
@ -65,7 +63,6 @@ class SirenSwitch(BaseRingSwitch):
|
||||
"""Creates a switch to turn the ring cameras siren on and off."""
|
||||
|
||||
_attr_translation_key = "siren"
|
||||
_attr_icon = SIREN_ICON
|
||||
|
||||
def __init__(self, device: RingGeneric, coordinator: RingDataCoordinator) -> None:
|
||||
"""Initialize the switch for a device with a siren."""
|
||||
|
@ -45,7 +45,6 @@ async def test_siren_on_reports_correctly(
|
||||
state = hass.states.get("switch.internal_siren")
|
||||
assert state.state == "on"
|
||||
assert state.attributes.get("friendly_name") == "Internal Siren"
|
||||
assert state.attributes.get("icon") == "mdi:alarm-bell"
|
||||
|
||||
|
||||
async def test_siren_can_be_turned_on(
|
||||
|
Loading…
x
Reference in New Issue
Block a user