aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/validate.yml16
-rw-r--r--README.md7
-rw-r--r--custom_components/haier/__init__.py (renamed from custom_components/hOn/__init__.py)0
-rw-r--r--custom_components/haier/binary_sensor.py (renamed from custom_components/hOn/binary_sensor.py)2
-rw-r--r--custom_components/haier/button.py (renamed from custom_components/hOn/button.py)0
-rw-r--r--[-rwxr-xr-x]custom_components/haier/config_flow.py (renamed from custom_components/hOn/config_flow.py)1
-rw-r--r--[-rwxr-xr-x]custom_components/haier/const.py (renamed from custom_components/hOn/const.py)2
-rw-r--r--[-rwxr-xr-x]custom_components/haier/hon.py (renamed from custom_components/hOn/hon.py)0
-rw-r--r--[-rwxr-xr-x]custom_components/haier/manifest.json (renamed from custom_components/hOn/manifest.json)10
-rw-r--r--custom_components/haier/number.py (renamed from custom_components/hOn/number.py)0
-rw-r--r--custom_components/haier/select.py (renamed from custom_components/hOn/select.py)4
-rw-r--r--custom_components/haier/sensor.py (renamed from custom_components/hOn/sensor.py)17
-rw-r--r--custom_components/haier/switch.py (renamed from custom_components/hOn/switch.py)6
-rw-r--r--custom_components/haier/translations/en.json (renamed from custom_components/hOn/translations/en.json)4
-rw-r--r--hacs.json4
15 files changed, 50 insertions, 23 deletions
diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
new file mode 100644
index 0000000..2014ad0
--- /dev/null
+++ b/.github/workflows/validate.yml
@@ -0,0 +1,16 @@
1name: Validate
2
3on:
4 push:
5 pull_request:
6
7jobs:
8 validate:
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v2
12 - uses: home-assistant/actions/hassfest@master
13 - name: HACS validation
14 uses: hacs/action@main
15 with:
16 category: integration \ No newline at end of file
diff --git a/README.md b/README.md
index d5c9b80..3d24922 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,11 @@
1# hOn 1# Haier hOn
2Home Assistant component supporting hOn cloud. 2Home Assistant component supporting hOn cloud.
3 3
4## Installation 4## Installation
51. Installing via HACS 5#### Installing via HACS
61. You need to have installed [HACS](https://hacs.xyz/)
62. Go to HACS->Integrations 72. Go to HACS->Integrations
73. Add this repo into your HACS custom repositories 83. Add this repo (`https://github.com/Andre0512/haier.git`) into your HACS custom repositories
84. Search for Haier hOn and Download it 94. Search for Haier hOn and Download it
95. Restart your HomeAssistant 105. Restart your HomeAssistant
106. Go to Settings->Devices & Services 116. Go to Settings->Devices & Services
diff --git a/custom_components/hOn/__init__.py b/custom_components/haier/__init__.py
index 8c3917b..8c3917b 100644
--- a/custom_components/hOn/__init__.py
+++ b/custom_components/haier/__init__.py
diff --git a/custom_components/hOn/binary_sensor.py b/custom_components/haier/binary_sensor.py
index 55f907c..fad7a8e 100644
--- a/custom_components/hOn/binary_sensor.py
+++ b/custom_components/haier/binary_sensor.py
@@ -35,7 +35,7 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = {
35 key="doorLockStatus", 35 key="doorLockStatus",
36 name="Door Locked", 36 name="Door Locked",
37 device_class=BinarySensorDeviceClass.DOOR, 37 device_class=BinarySensorDeviceClass.DOOR,
38 on_value="1", 38 on_value="0",
39 ), 39 ),
40 ) 40 )
41} 41}
diff --git a/custom_components/hOn/button.py b/custom_components/haier/button.py
index 8f48fa9..8f48fa9 100644
--- a/custom_components/hOn/button.py
+++ b/custom_components/haier/button.py
diff --git a/custom_components/hOn/config_flow.py b/custom_components/haier/config_flow.py
index ea30fbc..e4ec404 100755..100644
--- a/custom_components/hOn/config_flow.py
+++ b/custom_components/haier/config_flow.py
@@ -11,7 +11,6 @@ _LOGGER = logging.getLogger(__name__)
11 11
12 12
13class HonFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): 13class HonFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
14
15 VERSION = 1 14 VERSION = 1
16 CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL 15 CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
17 16
diff --git a/custom_components/hOn/const.py b/custom_components/haier/const.py
index 5dae56e..6e99520 100755..100644
--- a/custom_components/hOn/const.py
+++ b/custom_components/haier/const.py
@@ -1,4 +1,4 @@
1DOMAIN = "hon" 1DOMAIN = "haier"
2 2
3PLATFORMS = [ 3PLATFORMS = [
4 "sensor", 4 "sensor",
diff --git a/custom_components/hOn/hon.py b/custom_components/haier/hon.py
index 3c2b548..3c2b548 100755..100644
--- a/custom_components/hOn/hon.py
+++ b/custom_components/haier/hon.py
diff --git a/custom_components/hOn/manifest.json b/custom_components/haier/manifest.json
index 8701ffa..8871847 100755..100644
--- a/custom_components/hOn/manifest.json
+++ b/custom_components/haier/manifest.json
@@ -1,10 +1,10 @@
1{ 1{
2 "domain": "hon", 2 "domain": "haier",
3 "name": "hOn", 3 "name": "Haier hOn",
4 "config_flow": true,
5 "version": "0.1.0",
6 "codeowners": ["@Andre0512"], 4 "codeowners": ["@Andre0512"],
5 "config_flow": true,
6 "documentation": "https://github.com/Andre0512/haier/",
7 "iot_class": "cloud_polling", 7 "iot_class": "cloud_polling",
8 "requirements": ["pyhOn==0.2.4"], 8 "requirements": ["pyhOn==0.2.4"],
9 "documentation": "https://github.com/Andre0512/hOn/" 9 "version": "0.1.1"
10} 10}
diff --git a/custom_components/hOn/number.py b/custom_components/haier/number.py
index 0c41648..0c41648 100644
--- a/custom_components/hOn/number.py
+++ b/custom_components/haier/number.py
diff --git a/custom_components/hOn/select.py b/custom_components/haier/select.py
index 7c0406a..acd4162 100644
--- a/custom_components/hOn/select.py
+++ b/custom_components/haier/select.py
@@ -1,4 +1,3 @@
1"""Support for Tuya select."""
2from __future__ import annotations 1from __future__ import annotations
3 2
4from pyhon import HonConnection 3from pyhon import HonConnection
@@ -11,10 +10,9 @@ from homeassistant.const import UnitOfTemperature, REVOLUTIONS_PER_MINUTE
11from homeassistant.core import callback 10from homeassistant.core import callback
12from homeassistant.helpers.entity import EntityCategory 11from homeassistant.helpers.entity import EntityCategory
13 12
13from .const import DOMAIN
14from .hon import HonEntity, HonCoordinator 14from .hon import HonEntity, HonCoordinator
15 15
16DOMAIN = "hon"
17
18SELECTS = { 16SELECTS = {
19 "WM": ( 17 "WM": (
20 SelectEntityDescription( 18 SelectEntityDescription(
diff --git a/custom_components/hOn/sensor.py b/custom_components/haier/sensor.py
index 2dbd0c4..d957283 100644
--- a/custom_components/hOn/sensor.py
+++ b/custom_components/haier/sensor.py
@@ -9,7 +9,7 @@ from homeassistant.components.sensor import (
9 SensorEntityDescription, 9 SensorEntityDescription,
10) 10)
11from homeassistant.config_entries import ConfigEntry 11from homeassistant.config_entries import ConfigEntry
12from homeassistant.const import UnitOfEnergy, UnitOfVolume, UnitOfMass, UnitOfPower 12from homeassistant.const import UnitOfEnergy, UnitOfVolume, UnitOfMass, UnitOfPower, UnitOfTime
13from homeassistant.core import callback 13from homeassistant.core import callback
14from homeassistant.helpers.entity import EntityCategory 14from homeassistant.helpers.entity import EntityCategory
15from homeassistant.helpers.typing import StateType 15from homeassistant.helpers.typing import StateType
@@ -75,7 +75,20 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
75 icon="mdi:math-log", 75 icon="mdi:math-log",
76 translation_key="errors" 76 translation_key="errors"
77 ), 77 ),
78 78 SensorEntityDescription(
79 key="remainingTimeMM",
80 name="Remaining Time",
81 icon="mdi:timer",
82 state_class=SensorStateClass.MEASUREMENT,
83 native_unit_of_measurement=UnitOfTime.MINUTES,
84 ),
85 SensorEntityDescription(
86 key="spinSpeed",
87 name="Spin Speed",
88 icon="mdi:timer",
89 state_class=SensorStateClass.MEASUREMENT,
90 native_unit_of_measurement=UnitOfTime.MINUTES,
91 ),
79 ) 92 )
80} 93}
81 94
diff --git a/custom_components/hOn/switch.py b/custom_components/haier/switch.py
index 28e7887..00f4cb0 100644
--- a/custom_components/hOn/switch.py
+++ b/custom_components/haier/switch.py
@@ -1,13 +1,11 @@
1from collections.abc import Callable, Coroutine
2from dataclasses import dataclass 1from dataclasses import dataclass
3from typing import Any 2from typing import Any
4 3
5from pyhon import HonConnection
6from pyhon.device import HonDevice
7
8from homeassistant.components.switch import SwitchEntityDescription, SwitchEntity 4from homeassistant.components.switch import SwitchEntityDescription, SwitchEntity
9from homeassistant.config_entries import ConfigEntry 5from homeassistant.config_entries import ConfigEntry
10from homeassistant.const import EntityCategory 6from homeassistant.const import EntityCategory
7from pyhon import HonConnection
8from pyhon.device import HonDevice
11 9
12from .const import DOMAIN 10from .const import DOMAIN
13from .hon import HonCoordinator, HonEntity 11from .hon import HonCoordinator, HonEntity
diff --git a/custom_components/hOn/translations/en.json b/custom_components/haier/translations/en.json
index c4d9edd..7053903 100644
--- a/custom_components/hOn/translations/en.json
+++ b/custom_components/haier/translations/en.json
@@ -2,7 +2,7 @@
2 "config": { 2 "config": {
3 "step": { 3 "step": {
4 "user": { 4 "user": {
5 "title": "hOn", 5 "title": "Haier hOn",
6 "description": "Please enters your hOn credentials", 6 "description": "Please enters your hOn credentials",
7 "data": { 7 "data": {
8 "email": "Email Address", 8 "email": "Email Address",
@@ -15,8 +15,10 @@
15 "sensor": { 15 "sensor": {
16 "mode": { 16 "mode": {
17 "state": { 17 "state": {
18 "0": "Disconnected",
18 "1": "Ready", 19 "1": "Ready",
19 "2": "Running", 20 "2": "Running",
21 "3": "Paused",
20 "5": "Scheduled", 22 "5": "Scheduled",
21 "6": "Error", 23 "6": "Error",
22 "7": "Finished" 24 "7": "Finished"
diff --git a/hacs.json b/hacs.json
index a24c0d4..02a4917 100644
--- a/hacs.json
+++ b/hacs.json
@@ -1,5 +1,5 @@
1{ 1{
2 "name": "hOn", 2 "name": "Haier hOn",
3 "render_readme": false, 3 "render_readme": true,
4 "homeassistant": "2023.2.0" 4 "homeassistant": "2023.2.0"
5} \ No newline at end of file 5} \ No newline at end of file