Use DEVICE_CLASS_UPDATE in Shelly integration (#54746)

This commit is contained in:
Maciej Bieniek 2021-08-17 11:57:45 +02:00 committed by GitHub
parent 4f3d1c5e12
commit f1f05cdf1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: {