From 3d2101cac53a08644d6d4bf1e14b9f99fd874e7c Mon Sep 17 00:00:00 2001
From: Peter Galantha <peter.galantha@gmail.com>
Date: Thu, 14 Jul 2022 12:14:25 -0700
Subject: [PATCH] Add total state_class for esphome (#75015)

---
 homeassistant/components/esphome/manifest.json | 2 +-
 homeassistant/components/esphome/sensor.py     | 1 +
 requirements_all.txt                           | 2 +-
 requirements_test_all.txt                      | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/homeassistant/components/esphome/manifest.json b/homeassistant/components/esphome/manifest.json
index a8a76c2b0c8..cf748b27170 100644
--- a/homeassistant/components/esphome/manifest.json
+++ b/homeassistant/components/esphome/manifest.json
@@ -3,7 +3,7 @@
   "name": "ESPHome",
   "config_flow": true,
   "documentation": "https://www.home-assistant.io/integrations/esphome",
-  "requirements": ["aioesphomeapi==10.10.0"],
+  "requirements": ["aioesphomeapi==10.11.0"],
   "zeroconf": ["_esphomelib._tcp.local."],
   "dhcp": [{ "registered_devices": true }],
   "codeowners": ["@OttoWinter", "@jesserockz"],
diff --git a/homeassistant/components/esphome/sensor.py b/homeassistant/components/esphome/sensor.py
index 45a73a5e5af..897ab86b18a 100644
--- a/homeassistant/components/esphome/sensor.py
+++ b/homeassistant/components/esphome/sensor.py
@@ -67,6 +67,7 @@ _STATE_CLASSES: EsphomeEnumMapper[
         EsphomeSensorStateClass.NONE: None,
         EsphomeSensorStateClass.MEASUREMENT: SensorStateClass.MEASUREMENT,
         EsphomeSensorStateClass.TOTAL_INCREASING: SensorStateClass.TOTAL_INCREASING,
+        EsphomeSensorStateClass.TOTAL: SensorStateClass.TOTAL,
     }
 )
 
diff --git a/requirements_all.txt b/requirements_all.txt
index ad537da36ff..24850836455 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -150,7 +150,7 @@ aioeagle==1.1.0
 aioemonitor==1.0.5
 
 # homeassistant.components.esphome
-aioesphomeapi==10.10.0
+aioesphomeapi==10.11.0
 
 # homeassistant.components.flo
 aioflo==2021.11.0
diff --git a/requirements_test_all.txt b/requirements_test_all.txt
index a0bf0ab1d8a..22a93dacae8 100644
--- a/requirements_test_all.txt
+++ b/requirements_test_all.txt
@@ -137,7 +137,7 @@ aioeagle==1.1.0
 aioemonitor==1.0.5
 
 # homeassistant.components.esphome
-aioesphomeapi==10.10.0
+aioesphomeapi==10.11.0
 
 # homeassistant.components.flo
 aioflo==2021.11.0
-- 
GitLab