1
mirror of https://github.com/home-assistant/core synced 2024-10-07 10:13:38 +02:00

Remove unnecessary extra attribute from Pi-hole sensors (#56076)

This commit is contained in:
Michael 2021-09-27 12:27:03 +02:00 committed by GitHub
parent 6da548b56a
commit f2debf5c01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 8 deletions

View File

@ -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"

View File

@ -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"]}