From 13190724e0063a78f08aaa2593c0cba62fb28fca Mon Sep 17 00:00:00 2001 From: Adam Mills Date: Mon, 11 Dec 2017 23:29:44 -0500 Subject: [PATCH 1/2] Problem device class --- src/translations/en.json | 4 ++++ src/util/hass-util.html | 1 + 2 files changed, 5 insertions(+) diff --git a/src/translations/en.json b/src/translations/en.json index 22110e7847b6..2ba05cc738e9 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -107,6 +107,10 @@ "off": "[%key:state::device_tracker::not_home%]", "on": "[%key:state::device_tracker::home%]" }, + "problem": { + "off": "[%key:state::plant::ok%]", + "on": "[%key:state::plant::problem%]" + }, "safety": { "off": "Safe", "on": "Unsafe" diff --git a/src/util/hass-util.html b/src/util/hass-util.html index 3c5afcac2b48..cd6ab0ed87c0 100644 --- a/src/util/hass-util.html +++ b/src/util/hass-util.html @@ -225,6 +225,7 @@ return activated ? 'mdi:crop-portrait' : 'mdi:vibrate'; case 'gas': case 'power': + case 'problem': case 'safety': case 'smoke': return activated ? 'mdi:verified' : 'mdi:alert'; From 3aa23a46dc0a5522552d0183d78e7245e68913f4 Mon Sep 17 00:00:00 2001 From: Adam Mills Date: Wed, 13 Dec 2017 19:00:41 -0500 Subject: [PATCH 2/2] Move OK/Problem master to binary_sensor --- src/translations/en.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/translations/en.json b/src/translations/en.json index 2ba05cc738e9..0599da8fd0e3 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -108,8 +108,8 @@ "on": "[%key:state::device_tracker::home%]" }, "problem": { - "off": "[%key:state::plant::ok%]", - "on": "[%key:state::plant::problem%]" + "off": "OK", + "on": "Problem" }, "safety": { "off": "Safe", @@ -184,8 +184,8 @@ "stopped": "[%key:state::cover::stopped%]", "locked": "[%key:state::lock::locked%]", "unlocked": "[%key:state::lock::unlocked%]", - "ok": "[%key:state::plant::ok%]", - "problem": "[%key:state::plant::problem%]" + "ok": "[%key:state::binary_sensor::problem::off%]", + "problem": "[%key:state::binary_sensor::problem::on%]" }, "input_boolean": { "off": "[%key:state::default::off%]", @@ -208,8 +208,8 @@ "standby": "Standby" }, "plant": { - "ok": "OK", - "problem": "Problem" + "ok": "[%key:state::binary_sensor::problem::off%]", + "problem": "[%key:state::binary_sensor::problem::on%]" }, "remote": { "off": "[%key:state::default::off%]",