oin/oin_thermostat/__main__.py

21 lines
433 B
Python
Raw Normal View History

2024-12-07 15:22:08 +01:00
import logging
2024-12-08 10:43:31 +01:00
import tomllib
2024-12-07 15:22:08 +01:00
from .mqtt import HAClient
if __name__ == "__main__":
2024-12-08 10:43:31 +01:00
with open("config.toml", "rb") as config_file:
config = tomllib.load(config_file)
2024-12-07 15:22:08 +01:00
logging.basicConfig(level=logging.DEBUG)
client = HAClient(
"climate.chaudiere",
["sensor.esptic_tempo", "sensor.rte_tempo_prochaine_couleur"],
2024-12-08 10:43:31 +01:00
config.get("mqtt", dict()),
2024-12-07 15:22:08 +01:00
)
client.connect()
client.loop()