From d6e279e8f4e1f4266b45ba73ee31141c5a698c64 Mon Sep 17 00:00:00 2001 From: Miguel Camba Date: Sun, 23 Jul 2023 18:50:40 +0200 Subject: [PATCH] Add device_class PH, including default icon (#17385) --- gallery/src/pages/misc/entity-state.ts | 1 + src/common/const.ts | 2 ++ src/common/entity/get_states.ts | 1 + 3 files changed, 4 insertions(+) diff --git a/gallery/src/pages/misc/entity-state.ts b/gallery/src/pages/misc/entity-state.ts index c35c9fae1e..8a738ca873 100644 --- a/gallery/src/pages/misc/entity-state.ts +++ b/gallery/src/pages/misc/entity-state.ts @@ -35,6 +35,7 @@ const SENSOR_DEVICE_CLASSES = [ "nitrogen_monoxide", "nitrous_oxide", "ozone", + "ph", "pm1", "pm10", "pm25", diff --git a/src/common/const.ts b/src/common/const.ts index 7902662135..56b632d4be 100644 --- a/src/common/const.ts +++ b/src/common/const.ts @@ -45,6 +45,7 @@ import { mdiMoleculeCo, mdiMoleculeCo2, mdiPalette, + mdiPh, mdiProgressClock, mdiRayVertex, mdiRemote, @@ -148,6 +149,7 @@ export const FIXED_DEVICE_CLASS_ICONS = { nitrogen_monoxide: mdiMolecule, nitrous_oxide: mdiMolecule, ozone: mdiMolecule, + ph: mdiPh, pm1: mdiMolecule, pm10: mdiMolecule, pm25: mdiMolecule, diff --git a/src/common/entity/get_states.ts b/src/common/entity/get_states.ts index 7eaf7bfb81..17140b2166 100644 --- a/src/common/entity/get_states.ts +++ b/src/common/entity/get_states.ts @@ -186,6 +186,7 @@ const FIXED_DOMAIN_ATTRIBUTE_STATES = { "nitrogen_monoxide", "nitrous_oxide", "ozone", + "ph", "pm1", "pm10", "pm25",