mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
Use device class naming for SimpliSafe (#96093)
This commit is contained in:
parent
7f184e05e3
commit
a0d54e8f4e
@ -127,6 +127,7 @@ class SimpliSafeAlarm(SimpliSafeEntity, AlarmControlPanelEntity):
|
|||||||
AlarmControlPanelEntityFeature.ARM_HOME
|
AlarmControlPanelEntityFeature.ARM_HOME
|
||||||
| AlarmControlPanelEntityFeature.ARM_AWAY
|
| AlarmControlPanelEntityFeature.ARM_AWAY
|
||||||
)
|
)
|
||||||
|
_attr_name = None
|
||||||
|
|
||||||
def __init__(self, simplisafe: SimpliSafe, system: SystemType) -> None:
|
def __init__(self, simplisafe: SimpliSafe, system: SystemType) -> None:
|
||||||
"""Initialize the SimpliSafe alarm."""
|
"""Initialize the SimpliSafe alarm."""
|
||||||
|
@ -111,7 +111,6 @@ class BatteryBinarySensor(SimpliSafeEntity, BinarySensorEntity):
|
|||||||
"""Initialize."""
|
"""Initialize."""
|
||||||
super().__init__(simplisafe, system, device=device)
|
super().__init__(simplisafe, system, device=device)
|
||||||
|
|
||||||
self._attr_name = "Battery"
|
|
||||||
self._attr_unique_id = f"{super().unique_id}-battery"
|
self._attr_unique_id = f"{super().unique_id}-battery"
|
||||||
self._device: DeviceV3
|
self._device: DeviceV3
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ async def _async_clear_notifications(system: System) -> None:
|
|||||||
BUTTON_DESCRIPTIONS = (
|
BUTTON_DESCRIPTIONS = (
|
||||||
SimpliSafeButtonDescription(
|
SimpliSafeButtonDescription(
|
||||||
key=BUTTON_KIND_CLEAR_NOTIFICATIONS,
|
key=BUTTON_KIND_CLEAR_NOTIFICATIONS,
|
||||||
name="Clear notifications",
|
translation_key=BUTTON_KIND_CLEAR_NOTIFICATIONS,
|
||||||
push_action=_async_clear_notifications,
|
push_action=_async_clear_notifications,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -29,5 +29,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"button": {
|
||||||
|
"clear_notifications": {
|
||||||
|
"name": "Clear notifications"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user