Remove unnecessary extra attribute from Pi-hole sensors (#56076)
parent
6da548b56a
commit
f2debf5c01
|
@ -22,8 +22,6 @@ DEFAULT_STATISTICS_ONLY = True
|
|||
SERVICE_DISABLE = "disable"
|
||||
SERVICE_DISABLE_ATTR_DURATION = "duration"
|
||||
|
||||
ATTR_BLOCKED_DOMAINS = "domains_blocked"
|
||||
|
||||
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=5)
|
||||
|
||||
DATA_KEY_API = "api"
|
||||
|
|
|
@ -14,7 +14,6 @@ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
|||
|
||||
from . import PiHoleEntity
|
||||
from .const import (
|
||||
ATTR_BLOCKED_DOMAINS,
|
||||
DATA_KEY_API,
|
||||
DATA_KEY_COORDINATOR,
|
||||
DOMAIN as PIHOLE_DOMAIN,
|
||||
|
@ -69,8 +68,3 @@ class PiHoleSensor(PiHoleEntity, SensorEntity):
|
|||
return round(self.api.data[self.entity_description.key], 2)
|
||||
except TypeError:
|
||||
return self.api.data[self.entity_description.key]
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self) -> dict[str, Any]:
|
||||
"""Return the state attributes of the Pi-hole."""
|
||||
return {ATTR_BLOCKED_DOMAINS: self.api.data["domains_being_blocked"]}
|
||||
|
|
Loading…
Reference in New Issue