mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Make sure Tasmota status sensors are disabled (#42643)
This commit is contained in:
parent
6e9b0b4614
commit
73eaef0b1c
@ -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,
|
||||
@ -173,7 +174,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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user