Просмотр исходного кода

Switch to extra_state_attributes #751

Vassilis Panos 5 лет назад
Родитель
Сommit
cdbe3f1032

+ 1 - 1
custom_components/smartir/__init__.py

@@ -19,7 +19,7 @@ from homeassistant.helpers.typing import ConfigType
 _LOGGER = logging.getLogger(__name__)
 _LOGGER = logging.getLogger(__name__)
 
 
 DOMAIN = 'smartir'
 DOMAIN = 'smartir'
-VERSION = '1.17.1'
+VERSION = '1.17.2'
 MANIFEST_URL = (
 MANIFEST_URL = (
     "https://raw.githubusercontent.com/"
     "https://raw.githubusercontent.com/"
     "smartHomeHub/SmartIR/{}/"
     "smartHomeHub/SmartIR/{}/"

+ 1 - 1
custom_components/smartir/climate.py

@@ -279,7 +279,7 @@ class SmartIRClimate(ClimateEntity, RestoreEntity):
         return self._support_flags
         return self._support_flags
 
 
     @property
     @property
-    def device_state_attributes(self) -> dict:
+    def extra_state_attributes(self):
         """Platform specific attributes."""
         """Platform specific attributes."""
         return {
         return {
             'last_on_operation': self._last_on_operation,
             'last_on_operation': self._last_on_operation,

+ 1 - 1
custom_components/smartir/fan.py

@@ -196,7 +196,7 @@ class SmartIRFan(FanEntity, RestoreEntity):
         return self._support_flags
         return self._support_flags
 
 
     @property
     @property
-    def device_state_attributes(self) -> dict:
+    def extra_state_attributes(self):
         """Platform specific attributes."""
         """Platform specific attributes."""
         return {
         return {
             'last_on_speed': self._last_on_speed,
             'last_on_speed': self._last_on_speed,

+ 3 - 3
custom_components/smartir/manifest.json

@@ -6,10 +6,10 @@
   "codeowners": ["@smartHomeHub"],
   "codeowners": ["@smartHomeHub"],
   "requirements": ["aiofiles==0.6.0"],
   "requirements": ["aiofiles==0.6.0"],
   "homeassistant": "0.115.0",
   "homeassistant": "0.115.0",
-  "version": "1.17.1",
+  "version": "1.17.2",
   "updater": {
   "updater": {
-    "version": "1.17.1",
-    "releaseNotes": "-- Fixes issue #585",
+    "version": "1.17.2",
+    "releaseNotes": "-- Switch to extra_state_attributes #751",
     "files": [
     "files": [
       "__init__.py",
       "__init__.py",
       "climate.py",
       "climate.py",

+ 1 - 1
custom_components/smartir/media_player.py

@@ -208,7 +208,7 @@ class SmartIRMediaPlayer(MediaPlayerEntity, RestoreEntity):
         return self._support_flags
         return self._support_flags
 
 
     @property
     @property
-    def device_state_attributes(self) -> dict:
+    def extra_state_attributes(self):
         """Platform specific attributes."""
         """Platform specific attributes."""
         return {
         return {
             'device_code': self._device_code,
             'device_code': self._device_code,