diff --git a/custom_components/irrigation_unlimited/binary_sensor.py b/custom_components/irrigation_unlimited/binary_sensor.py index c5dbb30..4265b6d 100644 --- a/custom_components/irrigation_unlimited/binary_sensor.py +++ b/custom_components/irrigation_unlimited/binary_sensor.py @@ -47,6 +47,7 @@ RES_MANUAL, RES_NOT_RUNNING, RES_NONE, + ATTR_VOLUME, ) @@ -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 diff --git a/custom_components/irrigation_unlimited/const.py b/custom_components/irrigation_unlimited/const.py index 38dfe5b..6a15d14 100644 --- a/custom_components/irrigation_unlimited/const.py +++ b/custom_components/irrigation_unlimited/const.py @@ -193,6 +193,7 @@ ATTR_NEXT_TICK = "next_tick" ATTR_TICK_LOG = "tick_log" ATTR_SUSPENDED = "suspended" +ATTR_VOLUME = "volume" # Resources RES_MANUAL = "Manual"