Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
767a921602 |
16
.github/workflows/validate.yml
vendored
Normal file
16
.github/workflows/validate.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
name: Validate
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: home-assistant/actions/hassfest@master
|
||||
- name: HACS validation
|
||||
uses: hacs/action@main
|
||||
with:
|
||||
category: integration
|
@ -1,10 +1,11 @@
|
||||
# hOn
|
||||
# Haier hOn
|
||||
Home Assistant component supporting hOn cloud.
|
||||
|
||||
## Installation
|
||||
1. Installing via HACS
|
||||
#### Installing via HACS
|
||||
1. You need to have installed [HACS](https://hacs.xyz/)
|
||||
2. Go to HACS->Integrations
|
||||
3. Add this repo into your HACS custom repositories
|
||||
3. Add this repo (`https://github.com/Andre0512/haier.git`) into your HACS custom repositories
|
||||
4. Search for Haier hOn and Download it
|
||||
5. Restart your HomeAssistant
|
||||
6. Go to Settings->Devices & Services
|
||||
|
@ -35,7 +35,7 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = {
|
||||
key="doorLockStatus",
|
||||
name="Door Locked",
|
||||
device_class=BinarySensorDeviceClass.DOOR,
|
||||
on_value="1",
|
||||
on_value="0",
|
||||
),
|
||||
)
|
||||
}
|
1
custom_components/hOn/config_flow.py → custom_components/haier/config_flow.py
Executable file → Normal file
1
custom_components/hOn/config_flow.py → custom_components/haier/config_flow.py
Executable file → Normal file
@ -11,7 +11,6 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class HonFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
|
||||
VERSION = 1
|
||||
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
|
||||
|
2
custom_components/hOn/const.py → custom_components/haier/const.py
Executable file → Normal file
2
custom_components/hOn/const.py → custom_components/haier/const.py
Executable file → Normal file
@ -1,4 +1,4 @@
|
||||
DOMAIN = "hon"
|
||||
DOMAIN = "haier"
|
||||
|
||||
PLATFORMS = [
|
||||
"sensor",
|
0
custom_components/hOn/hon.py → custom_components/haier/hon.py
Executable file → Normal file
0
custom_components/hOn/hon.py → custom_components/haier/hon.py
Executable file → Normal file
10
custom_components/hOn/manifest.json → custom_components/haier/manifest.json
Executable file → Normal file
10
custom_components/hOn/manifest.json → custom_components/haier/manifest.json
Executable file → Normal file
@ -1,10 +1,10 @@
|
||||
{
|
||||
"domain": "hon",
|
||||
"name": "hOn",
|
||||
"config_flow": true,
|
||||
"version": "0.1.0",
|
||||
"domain": "haier",
|
||||
"name": "Haier hOn",
|
||||
"codeowners": ["@Andre0512"],
|
||||
"config_flow": true,
|
||||
"documentation": "https://github.com/Andre0512/haier/",
|
||||
"iot_class": "cloud_polling",
|
||||
"requirements": ["pyhOn==0.2.4"],
|
||||
"documentation": "https://github.com/Andre0512/hOn/"
|
||||
"version": "0.1.1"
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
"""Support for Tuya select."""
|
||||
from __future__ import annotations
|
||||
|
||||
from pyhon import HonConnection
|
||||
@ -11,10 +10,9 @@ from homeassistant.const import UnitOfTemperature, REVOLUTIONS_PER_MINUTE
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
|
||||
from .const import DOMAIN
|
||||
from .hon import HonEntity, HonCoordinator
|
||||
|
||||
DOMAIN = "hon"
|
||||
|
||||
SELECTS = {
|
||||
"WM": (
|
||||
SelectEntityDescription(
|
@ -9,7 +9,7 @@ from homeassistant.components.sensor import (
|
||||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import UnitOfEnergy, UnitOfVolume, UnitOfMass, UnitOfPower
|
||||
from homeassistant.const import UnitOfEnergy, UnitOfVolume, UnitOfMass, UnitOfPower, UnitOfTime
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.typing import StateType
|
||||
@ -75,7 +75,20 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
||||
icon="mdi:math-log",
|
||||
translation_key="errors"
|
||||
),
|
||||
|
||||
SensorEntityDescription(
|
||||
key="remainingTimeMM",
|
||||
name="Remaining Time",
|
||||
icon="mdi:timer",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="spinSpeed",
|
||||
name="Spin Speed",
|
||||
icon="mdi:timer",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
@ -1,13 +1,11 @@
|
||||
from collections.abc import Callable, Coroutine
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
||||
from pyhon import HonConnection
|
||||
from pyhon.device import HonDevice
|
||||
|
||||
from homeassistant.components.switch import SwitchEntityDescription, SwitchEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import EntityCategory
|
||||
from pyhon import HonConnection
|
||||
from pyhon.device import HonDevice
|
||||
|
||||
from .const import DOMAIN
|
||||
from .hon import HonCoordinator, HonEntity
|
@ -2,7 +2,7 @@
|
||||
"config": {
|
||||
"step": {
|
||||
"user": {
|
||||
"title": "hOn",
|
||||
"title": "Haier hOn",
|
||||
"description": "Please enters your hOn credentials",
|
||||
"data": {
|
||||
"email": "Email Address",
|
||||
@ -15,8 +15,10 @@
|
||||
"sensor": {
|
||||
"mode": {
|
||||
"state": {
|
||||
"0": "Disconnected",
|
||||
"1": "Ready",
|
||||
"2": "Running",
|
||||
"3": "Paused",
|
||||
"5": "Scheduled",
|
||||
"6": "Error",
|
||||
"7": "Finished"
|
Loading…
Reference in New Issue
Block a user