mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Clean up SmartTub (#51257)
* fix type hint * pylint * Update homeassistant/components/smarttub/binary_sensor.py Co-authored-by: Franck Nijhof <frenck@frenck.nl> * Update homeassistant/components/smarttub/binary_sensor.py Co-authored-by: Franck Nijhof <frenck@frenck.nl> Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
c317854e86
commit
416d91ba85
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user