fix service file and init of lib
This commit is contained in:
parent
ff7b95c032
commit
a1369c5ac9
|
@ -24,6 +24,8 @@ startTime = datetime.now()
|
|||
eq3bt_metrics = list()
|
||||
mutex = threading.Lock()
|
||||
|
||||
thermostat = Thermostat(eq3bt_mac)
|
||||
|
||||
class RequestHandler(BaseHTTPRequestHandler):
|
||||
|
||||
def get_metrics(self):
|
||||
|
@ -75,7 +77,6 @@ def update_metrics():
|
|||
eq3bt_metrics.clear()
|
||||
|
||||
try:
|
||||
thermostat = Thermostat(eq3bt_mac)
|
||||
thermostat.update()
|
||||
eq3bt_metrics.append("target_temperature " + str(int(thermostat.target_temperature)))
|
||||
eq3bt_metrics.append("valve " + str(int(thermostat.valve_state)))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Unit]
|
||||
Description=Prometheus gas station exporter for fuel prices
|
||||
Description=Prometheus eq3bt exporter for thermostats
|
||||
Documentation=https://git.mosad.xyz/localhorst/eq3bt-exporter
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
|
Loading…
Reference in New Issue