System Bridge - Set device class for binary sensor (#55688)

This commit is contained in:
Aidan Timson 2021-09-03 22:48:11 +01:00 committed by GitHub
parent 4eba2ccebc
commit cd51d994b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@ from systembridge import Bridge
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
DEVICE_CLASS_BATTERY_CHARGING, DEVICE_CLASS_BATTERY_CHARGING,
DEVICE_CLASS_UPDATE,
BinarySensorEntity, BinarySensorEntity,
BinarySensorEntityDescription, BinarySensorEntityDescription,
) )
@ -30,7 +31,7 @@ BASE_BINARY_SENSOR_TYPES: tuple[SystemBridgeBinarySensorEntityDescription, ...]
SystemBridgeBinarySensorEntityDescription( SystemBridgeBinarySensorEntityDescription(
key="version_available", key="version_available",
name="New Version Available", name="New Version Available",
icon="mdi:counter", device_class=DEVICE_CLASS_UPDATE,
value=lambda bridge: bridge.information.updates.available, value=lambda bridge: bridge.information.updates.available,
), ),
) )