From 991dfd283b21a21b52f73e2d7a1a01912d227378 Mon Sep 17 00:00:00 2001 From: Tsvi Mostovicz Date: Sun, 23 Jun 2024 11:55:07 +0000 Subject: [PATCH] Add entity category --- .../components/jewish_calendar/binary_sensor.py | 3 ++- homeassistant/components/jewish_calendar/sensor.py | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/jewish_calendar/binary_sensor.py b/homeassistant/components/jewish_calendar/binary_sensor.py index 4ce0dad6c01..54080fcefd8 100644 --- a/homeassistant/components/jewish_calendar/binary_sensor.py +++ b/homeassistant/components/jewish_calendar/binary_sensor.py @@ -16,7 +16,7 @@ from homeassistant.components.binary_sensor import ( BinarySensorEntityDescription, ) from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_LANGUAGE, CONF_LOCATION +from homeassistant.const import CONF_LANGUAGE, CONF_LOCATION, EntityCategory from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback from homeassistant.helpers import event from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -84,6 +84,7 @@ class JewishCalendarBinarySensor(BinarySensorEntity): """Representation of an Jewish Calendar binary sensor.""" _attr_should_poll = False + _attr_entity_category = EntityCategory.DIAGNOSTIC entity_description: JewishCalendarBinarySensorEntityDescription def __init__( diff --git a/homeassistant/components/jewish_calendar/sensor.py b/homeassistant/components/jewish_calendar/sensor.py index 8a4e424fd84..02a5da27119 100644 --- a/homeassistant/components/jewish_calendar/sensor.py +++ b/homeassistant/components/jewish_calendar/sensor.py @@ -15,7 +15,12 @@ from homeassistant.components.sensor import ( SensorEntityDescription, ) from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_LANGUAGE, CONF_LOCATION, SUN_EVENT_SUNSET +from homeassistant.const import ( + CONF_LANGUAGE, + CONF_LOCATION, + SUN_EVENT_SUNSET, + EntityCategory, +) from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.sun import get_astral_event_date @@ -194,6 +199,8 @@ async def async_setup_entry( class JewishCalendarSensor(SensorEntity): """Representation of an Jewish calendar sensor.""" + _attr_entity_category = EntityCategory.DIAGNOSTIC + def __init__( self, entry_id: str,