From 25655fa2a6eab6beb9887c39be91dcc97eb16b38 Mon Sep 17 00:00:00 2001 From: Thomas5555 Date: Mon, 22 Mar 2021 21:35:17 +0100 Subject: [PATCH 1/2] use extra_state_attributes --- custom_components/husqvarna_automower/const.py | 2 +- custom_components/husqvarna_automower/manifest.json | 2 +- custom_components/husqvarna_automower/vacuum.py | 6 +++--- hacs.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/custom_components/husqvarna_automower/const.py b/custom_components/husqvarna_automower/const.py index 1687b14a..571588b8 100644 --- a/custom_components/husqvarna_automower/const.py +++ b/custom_components/husqvarna_automower/const.py @@ -2,7 +2,7 @@ NAME = "husqvarna_automower" DOMAIN = "husqvarna_automower" DOMAIN_DATA = f"{DOMAIN}_data" -VERSION = "2021.3.5" +VERSION = "2021.4.0" ISSUE_URL = "https://github.com/Thomas55555/husqvarna_automower" HUSQVARNA_URL = "https://developer.husqvarnagroup.cloud/" diff --git a/custom_components/husqvarna_automower/manifest.json b/custom_components/husqvarna_automower/manifest.json index cf3fcbc8..5db75e30 100644 --- a/custom_components/husqvarna_automower/manifest.json +++ b/custom_components/husqvarna_automower/manifest.json @@ -7,5 +7,5 @@ "config_flow": true, "codeowners": ["@Thomas55555"], "requirements": ["aioautomower==2021.3.5"], - "version": "2021.3.5" + "version": "2021.4.0" } diff --git a/custom_components/husqvarna_automower/vacuum.py b/custom_components/husqvarna_automower/vacuum.py index 7bc2b113..a7456320 100644 --- a/custom_components/husqvarna_automower/vacuum.py +++ b/custom_components/husqvarna_automower/vacuum.py @@ -21,7 +21,7 @@ SUPPORT_TURN_ON, StateVacuumEntity, ) -from homeassistant.helpers import entity +from homeassistant.helpers.entity import Entity from homeassistant.helpers.update_coordinator import CoordinatorEntity, UpdateFailed from .const import DOMAIN, ERRORCODES, ICON @@ -47,7 +47,7 @@ async def async_setup_entry(hass, entry, async_add_devices): ) -class HusqvarnaEntity(entity.Entity): +class HusqvarnaEntity(Entity): """Defining the Husqvarna Entity.""" def __init__(self, coordinator): @@ -152,7 +152,7 @@ def battery_level(self): ) @property - def device_state_attributes(self): + def extra_state_attributes(self): """Return the specific state attributes of this mower.""" self.mower_attributes = self.coordinator.data["data"][self.idx]["attributes"] if ( diff --git a/hacs.json b/hacs.json index f83dd1c2..d5a622da 100644 --- a/hacs.json +++ b/hacs.json @@ -1,7 +1,7 @@ { "name": "Husqvarna Automower", "domains": ["vacuum"], - "homeassistant": "0.113.0", + "homeassistant": "2021.4.0", "iot_class": ["Cloud Polling"], "render_readme": true, "zip_release": true, From f3fe8fc8f4d9ee37acdfc0c2a3112415365fc63b Mon Sep 17 00:00:00 2001 From: Thomas5555 Date: Mon, 5 Apr 2021 00:38:21 +0200 Subject: [PATCH 2/2] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 08c91988..d7da09bb 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ But the adavantage is, that Husqvarna won't close the offical API suddenly. ## Installation -Requires Home Assistant 0.113 or newer. +Requires Home Assistant 2021.4.0 or newer. ### Installation through HACS