From 5f28c82837b273f0d6dd174e31f8de5e4ba404a4 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 30 Oct 2020 19:04:11 +0100 Subject: [PATCH] Make sure Tasmota status sensors are disabled (#42643) --- homeassistant/components/tasmota/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/tasmota/sensor.py b/homeassistant/components/tasmota/sensor.py index 076ca457a23..bdaac51f09c 100644 --- a/homeassistant/components/tasmota/sensor.py +++ b/homeassistant/components/tasmota/sensor.py @@ -1,6 +1,7 @@ """Support for Tasmota sensors.""" from typing import Optional +from hatasmota import status_sensor from hatasmota.const import ( SENSOR_AMBIENT, SENSOR_APPARENT_POWERUSAGE, @@ -162,7 +163,7 @@ class TasmotaSensor(TasmotaAvailability, TasmotaDiscoveryUpdate, Entity): def entity_registry_enabled_default(self) -> bool: """Return if the entity should be enabled when first added to the entity registry.""" # Hide status sensors to not overwhelm users - if self._tasmota_entity.quantity == SENSOR_STATUS_SIGNAL: + if self._tasmota_entity.quantity in status_sensor.SENSORS: return False return True