mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Use DEVICE_CLASS_UPDATE in Shelly integration (#54746)
This commit is contained in:
parent
4f3d1c5e12
commit
f1f05cdf1b
@ -12,6 +12,7 @@ from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_POWER,
|
||||
DEVICE_CLASS_PROBLEM,
|
||||
DEVICE_CLASS_SMOKE,
|
||||
DEVICE_CLASS_UPDATE,
|
||||
DEVICE_CLASS_VIBRATION,
|
||||
STATE_ON,
|
||||
BinarySensorEntity,
|
||||
@ -99,7 +100,7 @@ REST_SENSORS: Final = {
|
||||
),
|
||||
"fwupdate": RestAttributeDescription(
|
||||
name="Firmware Update",
|
||||
icon="mdi:update",
|
||||
device_class=DEVICE_CLASS_UPDATE,
|
||||
value=lambda status, _: status["update"]["has_update"],
|
||||
default_enabled=False,
|
||||
extra_state_attributes=lambda status: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user