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

Fixes action fan.toggle not supported #1341

Vassilis Panos 1 год назад
Родитель
Сommit
19f02ab95d

+ 1 - 1
custom_components/smartir/__init__.py

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

+ 4 - 1
custom_components/smartir/fan.py

@@ -108,7 +108,10 @@ class SmartIRFan(FanEntity, RestoreEntity):
         self._direction = None
         self._last_on_speed = None
         self._oscillating = None
-        self._support_flags = FanEntityFeature.SET_SPEED
+        self._support_flags = (
+            FanEntityFeature.SET_SPEED
+            | FanEntityFeature.TURN_OFF
+            | FanEntityFeature.TURN_ON)
 
         if (DIRECTION_REVERSE in self._commands and \
             DIRECTION_FORWARD in self._commands):

+ 3 - 3
custom_components/smartir/manifest.json

@@ -6,10 +6,10 @@
   "codeowners": ["@smartHomeHub"],
   "requirements": ["aiofiles>=0.6.0"],
   "homeassistant": "2024.10.0",
-  "version": "1.17.12",
+  "version": "1.17.13",
   "updater": {
-    "version": "1.17.12",
-    "releaseNotes": "-- Fixes media_player and fan attributes",
+    "version": "1.17.13",
+    "releaseNotes": "-- Fixes action fan.toggle not supported #1341",
     "files": [
       "__init__.py",
       "climate.py",