Improve coordinator logic in Tessie to allow sleep (#107988)

* Poll status before state

* Tests
This commit is contained in:
Brett Adams 2024-01-19 02:40:36 +10:00 committed by GitHub
parent cdb798bec0
commit 32b0bf6b4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 60 additions and 31 deletions

View file

@ -13,13 +13,21 @@ MODELS = {
}
class TessieStatus(StrEnum):
class TessieState(StrEnum):
"""Tessie status."""
ASLEEP = "asleep"
ONLINE = "online"
class TessieStatus(StrEnum):
"""Tessie status."""
ASLEEP = "asleep"
AWAKE = "awake"
WAITING = "waiting_for_sleep"
class TessieSeatHeaterOptions(StrEnum):
"""Tessie seat heater options."""