From 416d91ba8565e77480f4d287e70d88ef1cf17b37 Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Sun, 30 May 2021 01:10:49 -0700 Subject: [PATCH] Clean up SmartTub (#51257) * fix type hint * pylint * Update homeassistant/components/smarttub/binary_sensor.py Co-authored-by: Franck Nijhof * Update homeassistant/components/smarttub/binary_sensor.py Co-authored-by: Franck Nijhof Co-authored-by: Franck Nijhof --- homeassistant/components/smarttub/binary_sensor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/smarttub/binary_sensor.py b/homeassistant/components/smarttub/binary_sensor.py index 7ab343d2015..76cbd21f946 100644 --- a/homeassistant/components/smarttub/binary_sensor.py +++ b/homeassistant/components/smarttub/binary_sensor.py @@ -1,4 +1,6 @@ """Platform for binary sensor integration.""" +from __future__ import annotations + import logging from smarttub import SpaError, SpaReminder @@ -144,7 +146,7 @@ class SmartTubError(SmartTubEntity, BinarySensorEntity): ) @property - def error(self) -> SpaError: + def error(self) -> SpaError | None: """Return the underlying SpaError object for this entity.""" errors = self.coordinator.data[self.spa.id][ATTR_ERRORS] if len(errors) == 0: