Add category diagnostic to Surepetcare binary sensor (#57908)

pull/57920/head
Daniel Hjelseth Høyer 2021-10-17 19:47:07 +02:00 committed by GitHub
parent 3d33cad655
commit 8f6ed2d27e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,7 @@ from homeassistant.components.binary_sensor import (
BinarySensorEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ENTITY_CATEGORY_DIAGNOSTIC
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -67,6 +68,7 @@ class Hub(SurePetcareBinarySensor):
"""Sure Petcare Hub."""
_attr_device_class = DEVICE_CLASS_CONNECTIVITY
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
@property
def available(self) -> bool:
@ -116,6 +118,7 @@ class DeviceConnectivity(SurePetcareBinarySensor):
"""Sure Petcare Device."""
_attr_device_class = DEVICE_CLASS_CONNECTIVITY
_attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC
def __init__(
self,