From 7d3813b8fdf686e3d1a804988833ffad66953bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Sun, 16 Apr 2023 16:59:37 +0200 Subject: [PATCH 1/4] Update oven --- custom_components/hon/button.py | 12 ------------ custom_components/hon/manifest.json | 2 +- custom_components/hon/number.py | 2 +- custom_components/hon/select.py | 7 +------ custom_components/hon/switch.py | 11 +++++++++++ 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/custom_components/hon/button.py b/custom_components/hon/button.py index d932bc8..49f2a01 100644 --- a/custom_components/hon/button.py +++ b/custom_components/hon/button.py @@ -14,18 +14,6 @@ from .hon import HonCoordinator, HonEntity _LOGGER = logging.getLogger(__name__) BUTTONS: dict[str, tuple[ButtonEntityDescription, ...]] = { - "OV": ( - ButtonEntityDescription( - key="startProgram", - name="Start Program", - icon="mdi:power-cycle", - ), - ButtonEntityDescription( - key="stopProgram", - name="Stop Program", - icon="mdi:power-off", - ), - ), "IV": ( ButtonEntityDescription( key="startProgram", diff --git a/custom_components/hon/manifest.json b/custom_components/hon/manifest.json index ab245fc..775dbf3 100644 --- a/custom_components/hon/manifest.json +++ b/custom_components/hon/manifest.json @@ -6,6 +6,6 @@ "documentation": "https://github.com/Andre0512/hon/", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/Andre0512/hon/issues", - "requirements": ["pyhOn==0.8.0b4"], + "requirements": ["pyhOn"], "version": "0.6.0-beta.3" } diff --git a/custom_components/hon/number.py b/custom_components/hon/number.py index 468d5dd..9efa280 100644 --- a/custom_components/hon/number.py +++ b/custom_components/hon/number.py @@ -1,7 +1,7 @@ from __future__ import annotations from pyhon import Hon -from pyhon.parameter import HonParameterRange +from pyhon.parameter.range import HonParameterRange from homeassistant.components.number import ( NumberEntity, diff --git a/custom_components/hon/select.py b/custom_components/hon/select.py index 257240a..19d2142 100644 --- a/custom_components/hon/select.py +++ b/custom_components/hon/select.py @@ -4,7 +4,7 @@ import logging from pyhon import Hon from pyhon.appliance import HonAppliance -from pyhon.parameter import HonParameterFixed +from pyhon.parameter.fixed import HonParameterFixed from homeassistant.components.select import SelectEntity, SelectEntityDescription from homeassistant.config_entries import ConfigEntry @@ -70,11 +70,6 @@ SELECTS = { entity_category=EntityCategory.CONFIG, translation_key="programs", ), - SelectEntityDescription( - key="startProgram.preheatStatus", - name="Preheat", - entity_category=EntityCategory.CONFIG, - ), ), "IV": ( SelectEntityDescription( diff --git a/custom_components/hon/switch.py b/custom_components/hon/switch.py index 1d30b9d..c66298f 100644 --- a/custom_components/hon/switch.py +++ b/custom_components/hon/switch.py @@ -73,6 +73,17 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = { turn_off_key="resumeProgram", ), ), + + "OV": ( + HonSwitchEntityDescription( + key="active", + name="Oven", + icon="mdi:toaster-oven", + turn_on_key="startProgram", + turn_off_key="stopProgram", + ), + ), + "WD": ( HonSwitchEntityDescription( key="active", From 256c691213c4e38c39040511c62eae0d81dede02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Wed, 19 Apr 2023 19:31:45 +0200 Subject: [PATCH 2/4] Oven --- custom_components/hon/switch.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/custom_components/hon/switch.py b/custom_components/hon/switch.py index 57a0a36..28b3863 100644 --- a/custom_components/hon/switch.py +++ b/custom_components/hon/switch.py @@ -82,6 +82,13 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = { turn_on_key="startProgram", turn_off_key="stopProgram", ), + + HonSwitchEntityDescription( + key="startProgram.preheatStatus", + name="Preheat", + icon="mdi:thermometer-chevron-up", + entity_category=EntityCategory.CONFIG, + ), ), "WD": ( From 554ce1d7ffb12e27d966a0153a54e59adc6a4002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Wed, 19 Apr 2023 19:33:35 +0200 Subject: [PATCH 3/4] Update manifiest --- custom_components/hon/manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/hon/manifest.json b/custom_components/hon/manifest.json index b2b3e32..61b939a 100644 --- a/custom_components/hon/manifest.json +++ b/custom_components/hon/manifest.json @@ -6,7 +6,7 @@ "documentation": "https://github.com/Andre0512/hon/", "iot_class": "cloud_polling", "issue_tracker": "https://github.com/Andre0512/hon/issues", - "requirements": ["pyhOn"], - "version": "0.6.0-beta.3" + "requirements": ["pyhOn==0.8.1"], + "version": "0.6.1" } From e0081bf75e9b9736edceacdbad241db77dfbc72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Wed, 19 Apr 2023 20:18:40 +0200 Subject: [PATCH 4/4] Black style --- custom_components/hon/switch.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/custom_components/hon/switch.py b/custom_components/hon/switch.py index 28b3863..82afab4 100644 --- a/custom_components/hon/switch.py +++ b/custom_components/hon/switch.py @@ -73,7 +73,6 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = { turn_off_key="resumeProgram", ), ), - "OV": ( HonSwitchEntityDescription( key="active", @@ -82,7 +81,6 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = { turn_on_key="startProgram", turn_off_key="stopProgram", ), - HonSwitchEntityDescription( key="startProgram.preheatStatus", name="Preheat", @@ -90,7 +88,6 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = { entity_category=EntityCategory.CONFIG, ), ), - "WD": ( HonSwitchEntityDescription( key="active",