Skip to content

Commit

Permalink
MQTT Availability will now be posted with retain flag, to ensure HA s…
Browse files Browse the repository at this point in the history
…till sees the device after a restart or upgrade.
  • Loading branch information
slespersen committed Dec 13, 2024
1 parent fcfedf2 commit 7548912
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evseMQTT/mqttclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def publish(self, topic, payload, qos=0, retain=False):
self.client.publish(topic, payload, qos, retain)

def publish_availability(self, identifier, state):
self.client.publish(f"evseMQTT/{identifier}/availability", state)
self.client.publish(f"evseMQTT/{identifier}/availability", state, 0, True)

def publish_state(self, identifier, topic, state):
self.client.publish(f"evseMQTT/{identifier}/state/{topic}", json.dumps(state))
Expand Down

0 comments on commit 7548912

Please sign in to comment.