summaryrefslogtreecommitdiff
path: root/src/home
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-09-12 22:18:54 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-09-12 22:18:54 +0300
commit98eaa09acd2074e7923b32878725a8756b356afb (patch)
tree4310fcb4ff9ff83599b9de284c0d97e65e03dfa6 /src/home
parent8c0e4ab407412dcb9cb80525b168f2d09be90617 (diff)
mqtt: add temproom type
Diffstat (limited to 'src/home')
-rw-r--r--src/home/api/types/types.py1
-rw-r--r--src/home/database/sensors.py3
2 files changed, 4 insertions, 0 deletions
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'