ソースを参照

Removes legacy imports to the fan component

Vassilis Panos 4 年 前
親
コミット
2a115ca87c

+ 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.5'
+VERSION = '1.17.6'
 MANIFEST_URL = (
 MANIFEST_URL = (
     "https://raw.githubusercontent.com/"
     "https://raw.githubusercontent.com/"
     "smartHomeHub/SmartIR/{}/"
     "smartHomeHub/SmartIR/{}/"

+ 5 - 3
custom_components/smartir/fan.py

@@ -6,10 +6,10 @@ import os.path
 import voluptuous as vol
 import voluptuous as vol
 
 
 from homeassistant.components.fan import (
 from homeassistant.components.fan import (
-    FanEntity, PLATFORM_SCHEMA, ATTR_SPEED, 
-    SPEED_OFF, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH, 
+    FanEntity, PLATFORM_SCHEMA,
     DIRECTION_REVERSE, DIRECTION_FORWARD,
     DIRECTION_REVERSE, DIRECTION_FORWARD,
-    SUPPORT_SET_SPEED, SUPPORT_DIRECTION, SUPPORT_OSCILLATE, ATTR_OSCILLATING )
+    SUPPORT_SET_SPEED, SUPPORT_DIRECTION, SUPPORT_OSCILLATE, 
+    ATTR_OSCILLATING )
 from homeassistant.const import (
 from homeassistant.const import (
     CONF_NAME, STATE_OFF, STATE_ON, STATE_UNKNOWN)
     CONF_NAME, STATE_OFF, STATE_ON, STATE_UNKNOWN)
 from homeassistant.core import callback
 from homeassistant.core import callback
@@ -34,6 +34,8 @@ CONF_CONTROLLER_DATA = "controller_data"
 CONF_DELAY = "delay"
 CONF_DELAY = "delay"
 CONF_POWER_SENSOR = 'power_sensor'
 CONF_POWER_SENSOR = 'power_sensor'
 
 
+SPEED_OFF = "off"
+
 PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
 PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
     vol.Optional(CONF_UNIQUE_ID): cv.string,
     vol.Optional(CONF_UNIQUE_ID): cv.string,
     vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
     vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,

+ 4 - 4
custom_components/smartir/manifest.json

@@ -5,11 +5,11 @@
   "dependencies": [],
   "dependencies": [],
   "codeowners": ["@smartHomeHub"],
   "codeowners": ["@smartHomeHub"],
   "requirements": ["aiofiles==0.6.0"],
   "requirements": ["aiofiles==0.6.0"],
-  "homeassistant": "2022.2.0",
-  "version": "1.17.5",
+  "homeassistant": "2022.4.0",
+  "version": "1.17.6",
   "updater": {
   "updater": {
-    "version": "1.17.5",
-    "releaseNotes": "-- Compliance with the breaking change of the new fan model",
+    "version": "1.17.6",
+    "releaseNotes": "-- Removes legacy imports to the fan component",
     "files": [
     "files": [
       "__init__.py",
       "__init__.py",
       "climate.py",
       "climate.py",