kpetremann / mqtt-exporter

Simple generic MQTT Prometheus exporter for IoT working out of the box
https://hub.docker.com/r/kpetrem/mqtt-exporter
MIT License
108 stars 30 forks source link

Add support for ON/OFF state #13

Closed nanassito closed 3 years ago

nanassito commented 3 years ago

Add support for devices that expose a ON/OFF value. This is the case for several switch. This proposal maps ON to 1 and OFF to 0 when exporting the metrics.

nanassito commented 3 years ago

fixed the linting. Would you mind if I add them as a pre-commit to avoid the round trip to Travis every time ?

kpetremann commented 3 years ago

sure, go ahead. I was planning to add the tox.ini to do it using easily.