From 68495977643ebf39ff891c8cc727fd18f6c4eb36 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 27 Jun 2024 12:55:49 +0200 Subject: [PATCH] Bump hatasmota to 0.9.1 (#120649) --- .../components/tasmota/manifest.json | 2 +- homeassistant/components/tasmota/sensor.py | 4 +++ requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- .../tasmota/snapshots/test_sensor.ambr | 34 +++++++++++++++---- 5 files changed, 35 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/tasmota/manifest.json b/homeassistant/components/tasmota/manifest.json index 2ce81772774..69233de07d8 100644 --- a/homeassistant/components/tasmota/manifest.json +++ b/homeassistant/components/tasmota/manifest.json @@ -8,5 +8,5 @@ "iot_class": "local_push", "loggers": ["hatasmota"], "mqtt": ["tasmota/discovery/#"], - "requirements": ["HATasmota==0.8.0"] + "requirements": ["HATasmota==0.9.1"] } diff --git a/homeassistant/components/tasmota/sensor.py b/homeassistant/components/tasmota/sensor.py index 546e3eb4539..a7fb415f037 100644 --- a/homeassistant/components/tasmota/sensor.py +++ b/homeassistant/components/tasmota/sensor.py @@ -190,6 +190,10 @@ SENSOR_DEVICE_CLASS_ICON_MAP: dict[str, dict[str, Any]] = { DEVICE_CLASS: SensorDeviceClass.ENERGY, STATE_CLASS: SensorStateClass.TOTAL, }, + hc.SENSOR_TOTAL_TARIFF: { + DEVICE_CLASS: SensorDeviceClass.ENERGY, + STATE_CLASS: SensorStateClass.TOTAL, + }, hc.SENSOR_TOTAL_START_TIME: {ICON: "mdi:progress-clock"}, hc.SENSOR_TVOC: {ICON: "mdi:air-filter"}, hc.SENSOR_VOLTAGE: { diff --git a/requirements_all.txt b/requirements_all.txt index 44bc9f73b1d..06e5b6ef223 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -22,7 +22,7 @@ DoorBirdPy==2.1.0 HAP-python==4.9.1 # homeassistant.components.tasmota -HATasmota==0.8.0 +HATasmota==0.9.1 # homeassistant.components.mastodon Mastodon.py==1.8.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 45cb1087cb4..58691727bec 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -19,7 +19,7 @@ DoorBirdPy==2.1.0 HAP-python==4.9.1 # homeassistant.components.tasmota -HATasmota==0.8.0 +HATasmota==0.9.1 # homeassistant.components.doods # homeassistant.components.generic diff --git a/tests/components/tasmota/snapshots/test_sensor.ambr b/tests/components/tasmota/snapshots/test_sensor.ambr index 744554c7246..c5d70487749 100644 --- a/tests/components/tasmota/snapshots/test_sensor.ambr +++ b/tests/components/tasmota/snapshots/test_sensor.ambr @@ -232,7 +232,10 @@ # name: test_controlling_state_via_mqtt[sensor_config2-entity_ids2-messages2] StateSnapshot({ 'attributes': ReadOnlyDict({ + 'device_class': 'energy', 'friendly_name': 'Tasmota ENERGY TotalTariff 0', + 'state_class': , + 'unit_of_measurement': , }), 'context': , 'entity_id': 'sensor.tasmota_energy_totaltariff_0', @@ -247,7 +250,9 @@ 'aliases': set({ }), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'device_class': None, 'device_id': , @@ -264,7 +269,7 @@ 'name': None, 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, 'original_name': 'ENERGY TotalTariff 0', 'platform': 'tasmota', @@ -272,13 +277,16 @@ 'supported_features': 0, 'translation_key': None, 'unique_id': '00000049A3BC_sensor_sensor_ENERGY_TotalTariff_0', - 'unit_of_measurement': None, + 'unit_of_measurement': , }) # --- # name: test_controlling_state_via_mqtt[sensor_config2-entity_ids2-messages2].2 StateSnapshot({ 'attributes': ReadOnlyDict({ + 'device_class': 'energy', 'friendly_name': 'Tasmota ENERGY TotalTariff 1', + 'state_class': , + 'unit_of_measurement': , }), 'context': , 'entity_id': 'sensor.tasmota_energy_totaltariff_1', @@ -293,7 +301,9 @@ 'aliases': set({ }), 'area_id': None, - 'capabilities': None, + 'capabilities': dict({ + 'state_class': , + }), 'config_entry_id': , 'device_class': None, 'device_id': , @@ -310,7 +320,7 @@ 'name': None, 'options': dict({ }), - 'original_device_class': None, + 'original_device_class': , 'original_icon': None, 'original_name': 'ENERGY TotalTariff 1', 'platform': 'tasmota', @@ -318,13 +328,16 @@ 'supported_features': 0, 'translation_key': None, 'unique_id': '00000049A3BC_sensor_sensor_ENERGY_TotalTariff_1', - 'unit_of_measurement': None, + 'unit_of_measurement': , }) # --- # name: test_controlling_state_via_mqtt[sensor_config2-entity_ids2-messages2].4 StateSnapshot({ 'attributes': ReadOnlyDict({ + 'device_class': 'energy', 'friendly_name': 'Tasmota ENERGY TotalTariff 0', + 'state_class': , + 'unit_of_measurement': , }), 'context': , 'entity_id': 'sensor.tasmota_energy_totaltariff_0', @@ -337,7 +350,10 @@ # name: test_controlling_state_via_mqtt[sensor_config2-entity_ids2-messages2].5 StateSnapshot({ 'attributes': ReadOnlyDict({ + 'device_class': 'energy', 'friendly_name': 'Tasmota ENERGY TotalTariff 1', + 'state_class': , + 'unit_of_measurement': , }), 'context': , 'entity_id': 'sensor.tasmota_energy_totaltariff_1', @@ -350,7 +366,10 @@ # name: test_controlling_state_via_mqtt[sensor_config2-entity_ids2-messages2].6 StateSnapshot({ 'attributes': ReadOnlyDict({ + 'device_class': 'energy', 'friendly_name': 'Tasmota ENERGY TotalTariff 0', + 'state_class': , + 'unit_of_measurement': , }), 'context': , 'entity_id': 'sensor.tasmota_energy_totaltariff_0', @@ -363,7 +382,10 @@ # name: test_controlling_state_via_mqtt[sensor_config2-entity_ids2-messages2].7 StateSnapshot({ 'attributes': ReadOnlyDict({ + 'device_class': 'energy', 'friendly_name': 'Tasmota ENERGY TotalTariff 1', + 'state_class': , + 'unit_of_measurement': , }), 'context': , 'entity_id': 'sensor.tasmota_energy_totaltariff_1',