Mercurial > code > home > repos > light-bridge
diff light_bridge.py @ 14:e3dbd04dab96
add mqtt; talk to first light (no throttling)
author | drewp@bigasterisk.com |
---|---|
date | Sun, 28 Jan 2024 20:49:42 -0800 |
parents | 028ed39aa78f |
children | cee43f550577 |
line wrap: on
line diff
--- a/light_bridge.py Sun Jan 28 20:03:20 2024 -0800 +++ b/light_bridge.py Sun Jan 28 20:49:42 2024 -0800 @@ -18,7 +18,7 @@ from starlette_exporter import PrometheusMiddleware, handle_metrics from light import Lights - +from mqtt_io import MqttIo logging.basicConfig(level=logging.INFO) log = logging.getLogger() @@ -46,7 +46,8 @@ def main(): - lights = Lights() + mqtt = MqttIo() + lights = Lights(mqtt) graph = PatchableGraph() app = Starlette(debug=True, routes=[