Skip to content

Commit

Permalink
maint: Limit data attribute recording for all sensor entities
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerSelwyn committed Oct 28, 2023
1 parent 4079894 commit 193b255
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions custom_components/o365/classes/mailsensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from ..const import (
ATTR_ATTRIBUTES,
ATTR_AUTOREPLIESSETTINGS,
ATTR_DATA,
ATTR_END,
ATTR_EXTERNAL_AUDIENCE,
ATTR_EXTERNALREPLY,
Expand Down Expand Up @@ -38,8 +37,6 @@
class O365MailSensor(O365Sensor):
"""O365 generic Mail Sensor class."""

_unrecorded_attributes = frozenset((ATTR_DATA,))

def __init__(
self, coordinator, config, sensor_conf, mail_folder, name, entity_id, unique_id
):
Expand Down
3 changes: 2 additions & 1 deletion custom_components/o365/classes/sensorentity.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
import voluptuous as vol
from homeassistant.helpers.update_coordinator import CoordinatorEntity

from ..const import ATTR_STATE, CONF_PERMISSIONS
from ..const import ATTR_DATA, ATTR_STATE, CONF_PERMISSIONS


class O365Sensor(CoordinatorEntity):
"""O365 generic Sensor class."""

_attr_should_poll = False
_unrecorded_attributes = frozenset((ATTR_DATA,))

def __init__(self, coordinator, config, name, entity_id, entity_type, unique_id):
"""Initialise the O365 Sensor."""
Expand Down
2 changes: 0 additions & 2 deletions custom_components/o365/classes/teamssensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def __init__(self, coordinator, account, name, entity_id, config, unique_id):
class O365TeamsChatSensor(O365TeamsSensor, SensorEntity):
"""O365 Teams Chat sensor processing."""

_unrecorded_attributes = frozenset((ATTR_DATA,))

def __init__(
self, coordinator, account, name, entity_id, config, unique_id, enable_update
):
Expand Down

0 comments on commit 193b255

Please sign in to comment.