Skip to content

Commit

Permalink
Formalise constant
Browse files Browse the repository at this point in the history
  • Loading branch information
rgc99 committed Oct 24, 2023
1 parent 10dbf6d commit e410b96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/irrigation_unlimited/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
RES_MANUAL,
RES_NOT_RUNNING,
RES_NONE,
ATTR_VOLUME,
)


Expand Down Expand Up @@ -257,5 +258,5 @@ def extra_state_attributes(self):
attr[ATTR_CONFIGURATION] = self._zone.configuration
if self._zone.show_timeline:
attr[ATTR_TIMELINE] = self._zone.timeline()
attr["volume"] = self._zone.volume.total
attr[ATTR_VOLUME] = self._zone.volume.total
return attr
1 change: 1 addition & 0 deletions custom_components/irrigation_unlimited/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
ATTR_NEXT_TICK = "next_tick"
ATTR_TICK_LOG = "tick_log"
ATTR_SUSPENDED = "suspended"
ATTR_VOLUME = "volume"

# Resources
RES_MANUAL = "Manual"
Expand Down

0 comments on commit e410b96

Please sign in to comment.