Complete deprecation of hidden attribute (ATTR_HIDDEN) (#37041)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-06-23 17:05:32 -05:00
1 parent c289f9f099
commit 152a80abed
7 files changed
+4 -59

No files matched your search

@@ -222,11 +222,6 @@ class Alert(ToggleEntity):
return STATE_ON
return STATE_IDLE
@property
def hidden(self):
"""Hide the alert when it is not firing."""
return not self._can_ack or not self._firing
async def watched_entity_change(self, entity, from_state, to_state):
"""Determine if the alert should start or stop."""
_LOGGER.debug("Watched entity (%s) has changed", entity)
@@ -75,9 +75,6 @@ def setup(hass, config):
if state is None or state.state == STATE_UNKNOWN:
return
if state.attributes.get("hidden") is True:
return
states = dict(state.attributes)
metric = f"{prefix}.{state.domain}"
tags = [f"entity:{state.entity_id}"]
@@ -7,7 +7,6 @@ import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import (
ATTR_EDITABLE,
ATTR_HIDDEN,
ATTR_LATITUDE,
ATTR_LONGITUDE,
CONF_ICON,
@@ -332,7 +331,6 @@ class Zone(entity.Entity):
def _generate_attrs(self) -> None:
"""Generate new attrs based on config."""
self._attrs = {
ATTR_HIDDEN: True,
ATTR_LATITUDE: self._config[CONF_LATITUDE],
ATTR_LONGITUDE: self._config[CONF_LONGITUDE],
ATTR_RADIUS: self._config[CONF_RADIUS],