Skip to content

Configurable energy update interval #56

Description

@mattprecious

Is your feature request related to a problem? Please describe.
It seems like the energy sensors only update once every 30 minutes despite each packet containing an up-to-date energy value. This is problematic for the energy dashboard since hourly breakdowns for device usage are not accurate unless the update lands right before the hour rolls over.

Describe the solution you'd like
A configuration option to adjust the update interval or remove the throttling entirely.

Describe alternatives you've considered
Removing the throttle altogether without a configuration option? I assume it's there for a reason though.

Additional context

DEFAULT_UPDATE_INTERVAL = timedelta(minutes=30)

update_interval=DEFAULT_UPDATE_INTERVAL,

if update_interval:
self._update = Throttle(update_interval)(self.async_write_ha_state)
else:
self._update = self.async_write_ha_state

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions