From f0619c7d139cf0f034e3028d4b99cf23ef54eb3d Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 1 Oct 2018 12:32:03 +0200 Subject: [PATCH] Add pressure sensor device class (#1713) --- src/common/entity/sensor_icon.js | 1 + src/util/hass-attributes-util.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/entity/sensor_icon.js b/src/common/entity/sensor_icon.js index 3844a3201d..9a12bf3403 100644 --- a/src/common/entity/sensor_icon.js +++ b/src/common/entity/sensor_icon.js @@ -6,6 +6,7 @@ const fixedDeviceClassIcons = { humidity: 'hass:water-percent', illuminance: 'hass:brightness-5', temperature: 'hass:thermometer', + pressure: 'hass:gauge' }; export default function sensorIcon(state) { diff --git a/src/util/hass-attributes-util.js b/src/util/hass-attributes-util.js index 7384e5e456..466e7987c3 100644 --- a/src/util/hass-attributes-util.js +++ b/src/util/hass-attributes-util.js @@ -31,7 +31,8 @@ hassAttributeUtil.DOMAIN_DEVICE_CLASS = { 'battery', 'humidity', 'illuminance', - 'temperature' + 'temperature', + 'pressure' ], };