Use new BinarySensorDeviceClass in minecraft_server (#61924)

This commit is contained in:
epenet 2021-12-15 20:14:18 +01:00 committed by GitHub
parent 2da2de2ac8
commit d95ce8a026
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
"""The Minecraft Server binary sensor platform."""
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.config_entries import ConfigEntry
@ -33,7 +33,7 @@ class MinecraftServerStatusBinarySensor(MinecraftServerEntity, BinarySensorEntit
server=server,
type_name=NAME_STATUS,
icon=ICON_STATUS,
device_class=DEVICE_CLASS_CONNECTIVITY,
device_class=BinarySensorDeviceClass.CONNECTIVITY,
)
self._is_on = False