From 618cfd9ec524f8b5f15341de04afeb3585f67b44 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 28 Jul 2021 15:34:18 +0200 Subject: [PATCH] Add sensor monetary device_class (#2083) --- esphome/components/sensor/__init__.py | 2 ++ esphome/const.py | 1 + 2 files changed, 3 insertions(+) diff --git a/esphome/components/sensor/__init__.py b/esphome/components/sensor/__init__.py index 0a0c3a9214..62ed07b408 100644 --- a/esphome/components/sensor/__init__.py +++ b/esphome/components/sensor/__init__.py @@ -44,6 +44,7 @@ from esphome.const import ( DEVICE_CLASS_ENERGY, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE, + DEVICE_CLASS_MONETARY, DEVICE_CLASS_SIGNAL_STRENGTH, DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_POWER, @@ -66,6 +67,7 @@ DEVICE_CLASSES = [ DEVICE_CLASS_ENERGY, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE, + DEVICE_CLASS_MONETARY, DEVICE_CLASS_SIGNAL_STRENGTH, DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_TIMESTAMP, diff --git a/esphome/const.py b/esphome/const.py index b22bc5e1de..6702e773c6 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -777,6 +777,7 @@ DEVICE_CLASS_CURRENT = "current" DEVICE_CLASS_ENERGY = "energy" DEVICE_CLASS_HUMIDITY = "humidity" DEVICE_CLASS_ILLUMINANCE = "illuminance" +DEVICE_CLASS_MONETARY = "monetary" DEVICE_CLASS_SIGNAL_STRENGTH = "signal_strength" DEVICE_CLASS_TEMPERATURE = "temperature" DEVICE_CLASS_POWER_FACTOR = "power_factor"