From 00aaf84c37a748ddf3744236c3c3100ad4206fab Mon Sep 17 00:00:00 2001
From: DAVe3283 <DAVe3283@gmail.com>
Date: Thu, 2 Sep 2021 22:58:30 -0600
Subject: [PATCH] Fix uptime's state_class (esphome/issues#2337) (#2205)

---
 esphome/components/uptime/sensor.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/esphome/components/uptime/sensor.py b/esphome/components/uptime/sensor.py
index 6ea3cca189..7989f3befc 100644
--- a/esphome/components/uptime/sensor.py
+++ b/esphome/components/uptime/sensor.py
@@ -3,7 +3,7 @@ import esphome.config_validation as cv
 from esphome.components import sensor
 from esphome.const import (
     CONF_ID,
-    STATE_CLASS_NONE,
+    STATE_CLASS_TOTAL_INCREASING,
     UNIT_SECOND,
     ICON_TIMER,
 )
@@ -16,7 +16,7 @@ CONFIG_SCHEMA = (
         unit_of_measurement=UNIT_SECOND,
         icon=ICON_TIMER,
         accuracy_decimals=0,
-        state_class=STATE_CLASS_NONE,
+        state_class=STATE_CLASS_TOTAL_INCREASING,
     )
     .extend(
         {