Skip to content

Commit

Permalink
+ add long term statistics for the sensor values
Browse files Browse the repository at this point in the history
  • Loading branch information
langchr86 committed Jan 10, 2024
1 parent bb2cfc4 commit 6d6442c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions software/src/homeassistant/sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ String Sensor::GetConfigPayload() const
json["unique_id"] = device_unique_id_ + "_" + unique_id_;
json["state_topic"] = device_state_topic_;
json["value_template"] = "{{ value_json." + unique_id_ + " }}";
json["state_class"] = "measurement";

if (device_class_ != SensorDeviceClass::kNone)
{
Expand Down

0 comments on commit 6d6442c

Please sign in to comment.