From 07e384391826d88a8141eacb8dd1d425faa2ec76 Mon Sep 17 00:00:00 2001 From: emontnemery Date: Sun, 16 Dec 2018 15:44:25 +0100 Subject: [PATCH] Fix broken sensor.mqtt json_attributes deprecation message (#19349) --- homeassistant/components/sensor/mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/sensor/mqtt.py b/homeassistant/components/sensor/mqtt.py index 74da2a18563..737ac88b42a 100644 --- a/homeassistant/components/sensor/mqtt.py +++ b/homeassistant/components/sensor/mqtt.py @@ -100,7 +100,7 @@ class MqttSensor(MqttAttributes, MqttAvailability, MqttDiscoveryUpdate, qos = config.get(CONF_QOS) device_config = config.get(CONF_DEVICE) - if CONF_JSON_ATTRS in config: + if config.get(CONF_JSON_ATTRS): _LOGGER.warning('configuration variable "json_attributes" is ' 'deprecated, replace with "json_attributes_topic"')