From 98eaa09acd2074e7923b32878725a8756b356afb Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Mon, 12 Sep 2022 22:18:54 +0300 Subject: mqtt: add temproom type --- src/home/api/types/types.py | 1 + src/home/database/sensors.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/home/api/types/types.py b/src/home/api/types/types.py index 4d8b4ff..1d5596f 100644 --- a/src/home/api/types/types.py +++ b/src/home/api/types/types.py @@ -13,6 +13,7 @@ class BotType(Enum): class TemperatureSensorLocation(Enum): BIG_HOUSE_1 = auto() BIG_HOUSE_2 = auto() + BIG_HOUSE_ROOM = auto() STREET = auto() DIANA = auto() SPB1 = auto() diff --git a/src/home/database/sensors.py b/src/home/database/sensors.py index ca53dd0..4cfaa08 100644 --- a/src/home/database/sensors.py +++ b/src/home/database/sensors.py @@ -18,6 +18,9 @@ def get_temperature_table(sensor: TemperatureSensorLocation) -> str: elif sensor == TemperatureSensorLocation.BIG_HOUSE_2: return 'temp_roof' + elif sensor == TemperatureSensorLocation.BIG_HOUSE_ROOM: + return 'temp_room' + elif sensor == TemperatureSensorLocation.SPB1: return 'temp_spb1' -- cgit v1.2.3