From f5ea07c90a15c78d8b052ce226824243dce944bc Mon Sep 17 00:00:00 2001 From: Philip Johansson Date: Wed, 15 Jul 2020 12:14:19 +0200 Subject: [PATCH] Changes to availability topic --- README.md | 2 ++ src/main.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ce252c..18c24f1 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,8 @@ Adjust the name and topics to suite your configuration state_topic: light/bedlamp/relay/0 command_topic: light/bedlamp/relay/0/set availability_topic: light/bedlamp/status + payload_available: 1 + payload_not_available: 0 brightness: true rgb: true ``` \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index e969f8f..08dd406 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -138,7 +138,7 @@ void mqttPublishState() myLed.get().c_str()); mqttClient.publish( config.getMqttTopic(Config::MqttTopic::AvailabilityTopic).c_str(), - "online"); + "1"); } }