Skip to content

Commit

Permalink
feat(binary-sensor): Added rolling target as attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
BottlecapDave committed Jan 19, 2023
1 parent b386136 commit f1eaac9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/octopus_energy/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ def __init__(self, coordinator, config, is_export):
self._attributes = self._config.copy()
self._is_export = is_export
self._attributes["is_target_export"] = is_export
is_rolling_target = True
if CONFIG_TARGET_ROLLING_TARGET in self._config:
is_rolling_target = self._config[CONFIG_TARGET_ROLLING_TARGET]
self._attributes[CONFIG_TARGET_ROLLING_TARGET] = is_rolling_target
self._target_rates = []

@property
Expand Down

0 comments on commit f1eaac9

Please sign in to comment.