This reverts commit 2dc5c4dd69
.
This commit is contained in:
parent
b302534042
commit
251d8286e0
4 changed files with 4 additions and 16 deletions
|
@ -3,7 +3,7 @@
|
|||
"name": "Tasmota (beta)",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/tasmota",
|
||||
"requirements": ["hatasmota==0.0.26"],
|
||||
"requirements": ["hatasmota==0.0.25"],
|
||||
"dependencies": ["mqtt"],
|
||||
"mqtt": ["tasmota/discovery/#"],
|
||||
"codeowners": ["@emontnemery"]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"""Support for Tasmota sensors."""
|
||||
from typing import Optional
|
||||
|
||||
from hatasmota import status_sensor
|
||||
from hatasmota.const import (
|
||||
SENSOR_AMBIENT,
|
||||
SENSOR_APPARENT_POWERUSAGE,
|
||||
|
@ -34,12 +33,7 @@ from hatasmota.const import (
|
|||
SENSOR_PRESSUREATSEALEVEL,
|
||||
SENSOR_PROXIMITY,
|
||||
SENSOR_REACTIVE_POWERUSAGE,
|
||||
SENSOR_STATUS_IP,
|
||||
SENSOR_STATUS_LINK_COUNT,
|
||||
SENSOR_STATUS_MQTT_COUNT,
|
||||
SENSOR_STATUS_RSSI,
|
||||
SENSOR_STATUS_SIGNAL,
|
||||
SENSOR_STATUS_UPTIME,
|
||||
SENSOR_TEMPERATURE,
|
||||
SENSOR_TODAY,
|
||||
SENSOR_TOTAL,
|
||||
|
@ -59,7 +53,6 @@ from homeassistant.const import (
|
|||
DEVICE_CLASS_PRESSURE,
|
||||
DEVICE_CLASS_SIGNAL_STRENGTH,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
DEVICE_CLASS_TIMESTAMP,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
@ -89,10 +82,7 @@ SENSOR_DEVICE_CLASS_ICON_MAP = {
|
|||
SENSOR_FREQUENCY: {ICON: "mdi:current-ac"},
|
||||
SENSOR_HUMIDITY: {DEVICE_CLASS: DEVICE_CLASS_HUMIDITY},
|
||||
SENSOR_ILLUMINANCE: {DEVICE_CLASS: DEVICE_CLASS_ILLUMINANCE},
|
||||
SENSOR_STATUS_IP: {ICON: "mdi:ip-network"},
|
||||
SENSOR_STATUS_LINK_COUNT: {ICON: "mdi:counter"},
|
||||
SENSOR_MOISTURE: {ICON: "mdi:cup-water"},
|
||||
SENSOR_STATUS_MQTT_COUNT: {ICON: "mdi:counter"},
|
||||
SENSOR_PB0_3: {ICON: "mdi:flask"},
|
||||
SENSOR_PB0_5: {ICON: "mdi:flask"},
|
||||
SENSOR_PB10: {ICON: "mdi:flask"},
|
||||
|
@ -109,13 +99,11 @@ SENSOR_DEVICE_CLASS_ICON_MAP = {
|
|||
SENSOR_PROXIMITY: {ICON: "mdi:ruler"},
|
||||
SENSOR_REACTIVE_POWERUSAGE: {DEVICE_CLASS: DEVICE_CLASS_POWER},
|
||||
SENSOR_STATUS_SIGNAL: {DEVICE_CLASS: DEVICE_CLASS_SIGNAL_STRENGTH},
|
||||
SENSOR_STATUS_RSSI: {ICON: "mdi:access-point"},
|
||||
SENSOR_TEMPERATURE: {DEVICE_CLASS: DEVICE_CLASS_TEMPERATURE},
|
||||
SENSOR_TODAY: {DEVICE_CLASS: DEVICE_CLASS_POWER},
|
||||
SENSOR_TOTAL: {DEVICE_CLASS: DEVICE_CLASS_POWER},
|
||||
SENSOR_TOTAL_START_TIME: {ICON: "mdi:progress-clock"},
|
||||
SENSOR_TVOC: {ICON: "mdi:air-filter"},
|
||||
SENSOR_STATUS_UPTIME: {DEVICE_CLASS: DEVICE_CLASS_TIMESTAMP},
|
||||
SENSOR_VOLTAGE: {ICON: "mdi:alpha-v-circle-outline"},
|
||||
SENSOR_WEIGHT: {ICON: "mdi:scale"},
|
||||
SENSOR_YESTERDAY: {DEVICE_CLASS: DEVICE_CLASS_POWER},
|
||||
|
@ -174,7 +162,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 in status_sensor.SENSORS:
|
||||
if self._tasmota_entity.quantity == SENSOR_STATUS_SIGNAL:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
|
|
@ -738,7 +738,7 @@ hass-nabucasa==0.37.1
|
|||
hass_splunk==0.1.1
|
||||
|
||||
# homeassistant.components.tasmota
|
||||
hatasmota==0.0.26
|
||||
hatasmota==0.0.25
|
||||
|
||||
# homeassistant.components.jewish_calendar
|
||||
hdate==0.9.12
|
||||
|
|
|
@ -373,7 +373,7 @@ hangups==0.4.11
|
|||
hass-nabucasa==0.37.1
|
||||
|
||||
# homeassistant.components.tasmota
|
||||
hatasmota==0.0.26
|
||||
hatasmota==0.0.25
|
||||
|
||||
# homeassistant.components.jewish_calendar
|
||||
hdate==0.9.12
|
||||
|
|
Loading…
Add table
Reference in a new issue