Bump hatasmota to 0.0.26 (#42613)

* Tasmota : Add new Status Sensors

* Tasmota: add new Status Sensors

* Update RSSI sensor icon

Co-authored-by: Erik Montnemery <erik@montnemery.com>
pull/42579/head
Federico Leoni 2020-10-30 10:59:36 -03:00 committed by GitHub
parent 8c239f2304
commit 2dc5c4dd69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View File

@ -3,7 +3,7 @@
"name": "Tasmota (beta)",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/tasmota",
"requirements": ["hatasmota==0.0.25"],
"requirements": ["hatasmota==0.0.26"],
"dependencies": ["mqtt"],
"mqtt": ["tasmota/discovery/#"],
"codeowners": ["@emontnemery"]

View File

@ -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,
@ -33,7 +34,12 @@ 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,
@ -53,6 +59,7 @@ 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
@ -82,7 +89,10 @@ 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"},
@ -99,11 +109,13 @@ 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},
@ -162,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

View File

@ -738,7 +738,7 @@ hass-nabucasa==0.37.1
hass_splunk==0.1.1
# homeassistant.components.tasmota
hatasmota==0.0.25
hatasmota==0.0.26
# homeassistant.components.jewish_calendar
hdate==0.9.12

View File

@ -373,7 +373,7 @@ hangups==0.4.11
hass-nabucasa==0.37.1
# homeassistant.components.tasmota
hatasmota==0.0.25
hatasmota==0.0.26
# homeassistant.components.jewish_calendar
hdate==0.9.12