Add _entity_component_unrecorded_attributes to exclude attributes from record (#140)

Co-authored-by: Jean-Marc Collin <jean-marc.collin-extern@renault.com>
This commit is contained in:
Jean-Marc Collin
2023-10-28 18:31:15 +02:00
committed by GitHub
parent 17a0217678
commit e1c4fa1a08
4 changed files with 60 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
# pylint: disable=line-too-long
""" A climate over switch classe """
import logging
from homeassistant.core import HomeAssistant
@@ -20,6 +22,13 @@ _LOGGER = logging.getLogger(__name__)
class ThermostatOverSwitch(BaseThermostat):
"""Representation of a base class for a Versatile Thermostat over a switch."""
_entity_component_unrecorded_attributes = BaseThermostat._entity_component_unrecorded_attributes.union(frozenset(
{
"is_over_switch", "underlying_switch_0", "underlying_switch_1",
"underlying_switch_2", "underlying_switch_3", "on_time_sec", "off_time_sec",
"cycle_min", "function", "tpi_coef_int", "tpi_coef_ext"
}))
def __init__(self, hass: HomeAssistant, unique_id, name, entry_infos) -> None:
"""Initialize the thermostat over switch."""
super().__init__(hass, unique_id, name, entry_infos)