Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
bram2202 committed Aug 29, 2021
2 parents 873b71a + 4e7b574 commit 102f5cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AutoConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void AutoConfig::SendConfig()
// power_tariff
autoconfPayload["device"] = device.as<JsonObject>();
autoconfPayload["availability_topic"] = _identifier + "/power/power_tariff/status";
autoconfPayload["state_topic"] = _identifier + "/power/power_tariff/reset";
autoconfPayload["state_topic"] = _identifier + "/power/power_tariff";
autoconfPayload["name"] = _identifier + "_power_tariff";
autoconfPayload["unique_id"] = "power_tariff";
serializeJson(autoconfPayload, mqttPayload);
Expand Down
3 changes: 2 additions & 1 deletion esp8266-dsmr.ino
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,12 @@ void handleString(String incomingString)
break;
}

// Check if measurement state is offline, if so publish online state
// Check if measurement state is offline, if so publish online state and last reset
if (!measurement.online)
{
measurement.online = true;
mqttPublisher.publish(measurement.name + "/status", "online", true);
mqttPublisher.publish(measurement.name + "/reset", "1970-01-01T00:00:00+00:00", true);
}

// Publish measurement
Expand Down

0 comments on commit 102f5cb

Please sign in to comment.