20 lines
433 B
Python
20 lines
433 B
Python
import logging
|
|
import tomllib
|
|
|
|
from .mqtt import HAClient
|
|
|
|
if __name__ == "__main__":
|
|
with open("config.toml", "rb") as config_file:
|
|
config = tomllib.load(config_file)
|
|
|
|
logging.basicConfig(level=logging.DEBUG)
|
|
|
|
client = HAClient(
|
|
"climate.chaudiere",
|
|
["sensor.esptic_tempo", "sensor.rte_tempo_prochaine_couleur"],
|
|
config.get("mqtt", dict()),
|
|
)
|
|
|
|
client.connect()
|
|
|
|
client.loop()
|