Add some sensors
This commit is contained in:
parent
f02ec780a2
commit
6516f87127
6 changed files with 77 additions and 26 deletions
17
README.md
17
README.md
|
@ -383,9 +383,10 @@ For every device exists a button under diagnostics which can be used to log all
|
||||||
| Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` |
|
| Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` |
|
||||||
| Program | | `select` | `startProgram.program` |
|
| Program | | `select` | `startProgram.program` |
|
||||||
| Steam Type | `weather-dust` | `sensor` | `steamType` |
|
| Steam Type | `weather-dust` | `sensor` | `steamType` |
|
||||||
| Sterilization | `clock-start` | `switch` | `startProgram.sterilizationStatus` |
|
| Sterilization | `lotion-plus` | `switch` | `startProgram.sterilizationStatus` |
|
||||||
| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadD` |
|
| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadD` |
|
||||||
| Temperature level | `thermometer` | `number` | `startProgram.tempLevel` |
|
| Temperature level | `thermometer` | `number` | `startProgram.tempLevel` |
|
||||||
|
| Tumbling | `refresh-circle` | `switch` | `startProgram.tumblingStatus` |
|
||||||
#### Sensors
|
#### Sensors
|
||||||
| Name | Icon | Entity | Key |
|
| Name | Icon | Entity | Key |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
|
@ -426,14 +427,17 @@ For every device exists a button under diagnostics which can be used to log all
|
||||||
#### Controls
|
#### Controls
|
||||||
| Name | Icon | Entity | Key |
|
| Name | Icon | Entity | Key |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
|
| Auto Dose Detergent | `cup` | `switch` | `autoDetergentStatus` |
|
||||||
|
| Auto Dose Softener | `teddy-bear` | `switch` | `autoSoftenerStatus` |
|
||||||
| Pause Washer Dryer | `pause` | `switch` | `pauseProgram` / `resumeProgram` |
|
| Pause Washer Dryer | `pause` | `switch` | `pauseProgram` / `resumeProgram` |
|
||||||
| Washer Dryer | `washing-machine` | `switch` | `startProgram` / `stopProgram` |
|
| Washer Dryer | `washing-machine` | `switch` | `startProgram` / `stopProgram` |
|
||||||
|
| Water hard | `water` | `number` | `settings.waterHard` |
|
||||||
#### Configs
|
#### Configs
|
||||||
| Name | Icon | Entity | Key |
|
| Name | Icon | Entity | Key |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| Acqua Plus | `water-plus` | `switch` | `startProgram.acquaplus` |
|
| Acqua Plus | `water-plus` | `switch` | `startProgram.acquaplus` |
|
||||||
| Anti-Crease | `iron` | `switch` | `startProgram.antiCreaseTime` |
|
|
||||||
| Anti-Crease | `iron` | `switch` | `startProgram.anticrease` |
|
| Anti-Crease | `iron` | `switch` | `startProgram.anticrease` |
|
||||||
|
| Anti-Crease | `iron` | `switch` | `startProgram.antiCreaseTime` |
|
||||||
| Auto Dose Detergent | `cup` | `switch` | `startProgram.autoDetergentStatus` |
|
| Auto Dose Detergent | `cup` | `switch` | `startProgram.autoDetergentStatus` |
|
||||||
| Auto Dose Softener | `teddy-bear` | `switch` | `startProgram.autoSoftenerStatus` |
|
| Auto Dose Softener | `teddy-bear` | `switch` | `startProgram.autoSoftenerStatus` |
|
||||||
| Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` |
|
| Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` |
|
||||||
|
@ -452,6 +456,7 @@ For every device exists a button under diagnostics which can be used to log all
|
||||||
| Liquid Detergent Dose | `cup-water` | `sensor` | `startProgram.liquidDetergentDose` |
|
| Liquid Detergent Dose | `cup-water` | `sensor` | `startProgram.liquidDetergentDose` |
|
||||||
| Main Wash Time | `clock-start` | `number` | `startProgram.mainWashTime` |
|
| Main Wash Time | `clock-start` | `number` | `startProgram.mainWashTime` |
|
||||||
| Powder Detergent Dose | `cup` | `sensor` | `startProgram.powderDetergentDose` |
|
| Powder Detergent Dose | `cup` | `sensor` | `startProgram.powderDetergentDose` |
|
||||||
|
| Prewash | `tshirt-crew` | `switch` | `startProgram.prewash` |
|
||||||
| Program | | `select` | `startProgram.program` |
|
| Program | | `select` | `startProgram.program` |
|
||||||
| Remaining Time | `timer` | `sensor` | `startProgram.remainingTime` |
|
| Remaining Time | `timer` | `sensor` | `startProgram.remainingTime` |
|
||||||
| Rinse Iterations | `rotate-right` | `number` | `startProgram.rinseIterations` |
|
| Rinse Iterations | `rotate-right` | `number` | `startProgram.rinseIterations` |
|
||||||
|
@ -459,12 +464,13 @@ For every device exists a button under diagnostics which can be used to log all
|
||||||
| Spin speed | `numeric` | `select` | `startProgram.spinSpeed` |
|
| Spin speed | `numeric` | `select` | `startProgram.spinSpeed` |
|
||||||
| Steam Type | `weather-dust` | `sensor` | `steamType` |
|
| Steam Type | `weather-dust` | `sensor` | `steamType` |
|
||||||
| Steam level | `weather-dust` | `select` | `startProgram.steamLevel` |
|
| Steam level | `weather-dust` | `select` | `startProgram.steamLevel` |
|
||||||
| Sterilization | `clock-start` | `switch` | `startProgram.sterilizationStatus` |
|
| Sterilization | `lotion-plus` | `switch` | `startProgram.sterilizationStatus` |
|
||||||
| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadW` |
|
| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadW` |
|
||||||
| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadD` |
|
| Suggested Load | `weight-kilogram` | `sensor` | `startProgram.suggestedLoadD` |
|
||||||
| Suggested weight | `weight-kilogram` | `sensor` | `startProgram.weight` |
|
| Suggested weight | `weight-kilogram` | `sensor` | `startProgram.weight` |
|
||||||
| Temperature | `thermometer` | `select` | `startProgram.temp` |
|
| Temperature | `thermometer` | `select` | `startProgram.temp` |
|
||||||
| Temperature level | `thermometer` | `number` | `startProgram.tempLevel` |
|
| Temperature level | `thermometer` | `number` | `startProgram.tempLevel` |
|
||||||
|
| Tumbling | `refresh-circle` | `switch` | `startProgram.tumblingStatus` |
|
||||||
| Water hard | `water` | `number` | `startProgram.waterHard` |
|
| Water hard | `water` | `number` | `startProgram.waterHard` |
|
||||||
| lang | | `number` | `startProgram.lang` |
|
| lang | | `number` | `startProgram.lang` |
|
||||||
#### Sensors
|
#### Sensors
|
||||||
|
@ -502,12 +508,16 @@ For every device exists a button under diagnostics which can be used to log all
|
||||||
#### Controls
|
#### Controls
|
||||||
| Name | Icon | Entity | Key |
|
| Name | Icon | Entity | Key |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
|
| Auto Dose Detergent | `cup` | `switch` | `autoDetergentStatus` |
|
||||||
|
| Auto Dose Softener | `teddy-bear` | `switch` | `autoSoftenerStatus` |
|
||||||
| Pause Washing Machine | `pause` | `switch` | `pauseProgram` / `resumeProgram` |
|
| Pause Washing Machine | `pause` | `switch` | `pauseProgram` / `resumeProgram` |
|
||||||
| Washing Machine | `washing-machine` | `switch` | `startProgram` / `stopProgram` |
|
| Washing Machine | `washing-machine` | `switch` | `startProgram` / `stopProgram` |
|
||||||
|
| Water hard | `water` | `number` | `settings.waterHard` |
|
||||||
#### Configs
|
#### Configs
|
||||||
| Name | Icon | Entity | Key |
|
| Name | Icon | Entity | Key |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| Acqua Plus | `water-plus` | `switch` | `startProgram.acquaplus` |
|
| Acqua Plus | `water-plus` | `switch` | `startProgram.acquaplus` |
|
||||||
|
| Anti-Crease | `iron` | `switch` | `startProgram.anticrease` |
|
||||||
| Auto Dose Detergent | `cup` | `switch` | `startProgram.autoDetergentStatus` |
|
| Auto Dose Detergent | `cup` | `switch` | `startProgram.autoDetergentStatus` |
|
||||||
| Auto Dose Softener | `teddy-bear` | `switch` | `startProgram.autoSoftenerStatus` |
|
| Auto Dose Softener | `teddy-bear` | `switch` | `startProgram.autoSoftenerStatus` |
|
||||||
| Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` |
|
| Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` |
|
||||||
|
@ -523,6 +533,7 @@ For every device exists a button under diagnostics which can be used to log all
|
||||||
| Liquid Detergent Dose | `cup-water` | `sensor` | `startProgram.liquidDetergentDose` |
|
| Liquid Detergent Dose | `cup-water` | `sensor` | `startProgram.liquidDetergentDose` |
|
||||||
| Main Wash Time | `clock-start` | `number` | `startProgram.mainWashTime` |
|
| Main Wash Time | `clock-start` | `number` | `startProgram.mainWashTime` |
|
||||||
| Powder Detergent Dose | `cup` | `sensor` | `startProgram.powderDetergentDose` |
|
| Powder Detergent Dose | `cup` | `sensor` | `startProgram.powderDetergentDose` |
|
||||||
|
| Prewash | `tshirt-crew` | `switch` | `startProgram.prewash` |
|
||||||
| Program | | `select` | `startProgram.program` |
|
| Program | | `select` | `startProgram.program` |
|
||||||
| Remaining Time | `timer` | `sensor` | `startProgram.remainingTime` |
|
| Remaining Time | `timer` | `sensor` | `startProgram.remainingTime` |
|
||||||
| Rinse Iterations | `rotate-right` | `number` | `startProgram.rinseIterations` |
|
| Rinse Iterations | `rotate-right` | `number` | `startProgram.rinseIterations` |
|
||||||
|
|
|
@ -363,7 +363,13 @@ class HonClimateEntity(HonEntity, ClimateEntity):
|
||||||
|
|
||||||
async def async_set_preset_mode(self, preset_mode: str) -> None:
|
async def async_set_preset_mode(self, preset_mode: str) -> None:
|
||||||
"""Set the new preset mode."""
|
"""Set the new preset mode."""
|
||||||
command = "stopProgram" if preset_mode == "no_mode" else "startProgram"
|
if preset_mode == "no_mode" and HVACMode.OFF in self.hvac_modes:
|
||||||
|
command = "stopProgram"
|
||||||
|
elif preset_mode == "no_mode":
|
||||||
|
command = "settings"
|
||||||
|
self._device.commands["settings"].reset()
|
||||||
|
else:
|
||||||
|
command = "startProgram"
|
||||||
if program := self._device.settings.get(f"{command}.program"):
|
if program := self._device.settings.get(f"{command}.program"):
|
||||||
program.value = preset_mode
|
program.value = preset_mode
|
||||||
zone = self._device.settings.get(f"{command}.zone")
|
zone = self._device.settings.get(f"{command}.zone")
|
||||||
|
@ -371,9 +377,9 @@ class HonClimateEntity(HonEntity, ClimateEntity):
|
||||||
zone.value = self.entity_description.name.lower()
|
zone.value = self.entity_description.name.lower()
|
||||||
self._device.sync_command(command, "settings")
|
self._device.sync_command(command, "settings")
|
||||||
self._set_temperature_bound()
|
self._set_temperature_bound()
|
||||||
|
self._attr_preset_mode = preset_mode
|
||||||
await self.coordinator.async_refresh()
|
await self.coordinator.async_refresh()
|
||||||
await self._device.commands[command].send()
|
await self._device.commands[command].send()
|
||||||
self._attr_preset_mode = preset_mode
|
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
def _set_temperature_bound(self) -> None:
|
def _set_temperature_bound(self) -> None:
|
||||||
|
|
|
@ -57,6 +57,12 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||||
icon="mdi:water",
|
icon="mdi:water",
|
||||||
translation_key="water_hard",
|
translation_key="water_hard",
|
||||||
),
|
),
|
||||||
|
HonNumberEntityDescription(
|
||||||
|
key="settings.waterHard",
|
||||||
|
name="Water hard",
|
||||||
|
icon="mdi:water",
|
||||||
|
translation_key="water_hard",
|
||||||
|
),
|
||||||
HonConfigNumberEntityDescription(
|
HonConfigNumberEntityDescription(
|
||||||
key="startProgram.lang",
|
key="startProgram.lang",
|
||||||
name="lang",
|
name="lang",
|
||||||
|
|
|
@ -63,6 +63,12 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||||
icon="mdi:tshirt-crew",
|
icon="mdi:tshirt-crew",
|
||||||
translation_key="prewash",
|
translation_key="prewash",
|
||||||
),
|
),
|
||||||
|
HonConfigSwitchEntityDescription(
|
||||||
|
key="startProgram.prewash",
|
||||||
|
name="Prewash",
|
||||||
|
icon="mdi:tshirt-crew",
|
||||||
|
translation_key="prewash",
|
||||||
|
),
|
||||||
HonConfigSwitchEntityDescription(
|
HonConfigSwitchEntityDescription(
|
||||||
key="startProgram.permanentPressStatus",
|
key="startProgram.permanentPressStatus",
|
||||||
name="Keep Fresh",
|
name="Keep Fresh",
|
||||||
|
@ -81,6 +87,18 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||||
icon="mdi:cup",
|
icon="mdi:cup",
|
||||||
translation_key="auto_dose_detergent",
|
translation_key="auto_dose_detergent",
|
||||||
),
|
),
|
||||||
|
HonSwitchEntityDescription(
|
||||||
|
key="autoSoftenerStatus",
|
||||||
|
name="Auto Dose Softener",
|
||||||
|
icon="mdi:teddy-bear",
|
||||||
|
translation_key="auto_dose_softener",
|
||||||
|
),
|
||||||
|
HonSwitchEntityDescription(
|
||||||
|
key="autoDetergentStatus",
|
||||||
|
name="Auto Dose Detergent",
|
||||||
|
icon="mdi:cup",
|
||||||
|
translation_key="auto_dose_detergent",
|
||||||
|
),
|
||||||
HonConfigSwitchEntityDescription(
|
HonConfigSwitchEntityDescription(
|
||||||
key="startProgram.acquaplus",
|
key="startProgram.acquaplus",
|
||||||
name="Acqua Plus",
|
name="Acqua Plus",
|
||||||
|
@ -117,6 +135,12 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||||
icon="mdi:lotion-plus",
|
icon="mdi:lotion-plus",
|
||||||
translation_key="hygiene",
|
translation_key="hygiene",
|
||||||
),
|
),
|
||||||
|
HonConfigSwitchEntityDescription(
|
||||||
|
key="startProgram.anticrease",
|
||||||
|
name="Anti-Crease",
|
||||||
|
icon="mdi:iron",
|
||||||
|
translation_key="anti_crease",
|
||||||
|
),
|
||||||
),
|
),
|
||||||
"TD": (
|
"TD": (
|
||||||
HonControlSwitchEntityDescription(
|
HonControlSwitchEntityDescription(
|
||||||
|
@ -138,7 +162,13 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||||
HonConfigSwitchEntityDescription(
|
HonConfigSwitchEntityDescription(
|
||||||
key="startProgram.sterilizationStatus",
|
key="startProgram.sterilizationStatus",
|
||||||
name="Sterilization",
|
name="Sterilization",
|
||||||
icon="mdi:clock-start",
|
icon="mdi:lotion-plus",
|
||||||
|
),
|
||||||
|
HonConfigSwitchEntityDescription(
|
||||||
|
key="startProgram.tumblingStatus",
|
||||||
|
name="Tumbling",
|
||||||
|
icon="mdi:refresh-circle",
|
||||||
|
translation_key="keep_fresh",
|
||||||
),
|
),
|
||||||
HonConfigSwitchEntityDescription(
|
HonConfigSwitchEntityDescription(
|
||||||
key="startProgram.antiCreaseTime",
|
key="startProgram.antiCreaseTime",
|
||||||
|
@ -370,10 +400,7 @@ async def async_setup_entry(
|
||||||
continue
|
continue
|
||||||
entity = HonControlSwitchEntity(hass, entry, device, description)
|
entity = HonControlSwitchEntity(hass, entry, device, description)
|
||||||
elif isinstance(description, HonSwitchEntityDescription):
|
elif isinstance(description, HonSwitchEntityDescription):
|
||||||
if (
|
if f"settings.{description.key}" not in device.available_settings:
|
||||||
f"settings.{description.key}" not in device.available_settings
|
|
||||||
or device.get(description.key) is None
|
|
||||||
):
|
|
||||||
continue
|
continue
|
||||||
entity = HonSwitchEntity(hass, entry, device, description)
|
entity = HonSwitchEntity(hass, entry, device, description)
|
||||||
else:
|
else:
|
||||||
|
|
2
info.md
2
info.md
|
@ -29,7 +29,7 @@ Support has been confirmed for these models, but many more will work. Please add
|
||||||
|
|
||||||
|
|
||||||
| | **Haier** | **Hoover** | **Candy** |
|
| | **Haier** | **Hoover** | **Candy** |
|
||||||
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
|
|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
|
||||||
| **Washing Machine** | HW80-B14959TU1DE <br/> HW80-B14959TU1IT <br/> HW80-B14979TU1 <br/> HW90-B14TEAM5 <br/> HW90G-BD14979UD <br/> HW100-B14959U1 <br/> HW110-14979 | H-WASH 500 <br/> H7W4 48MBC-S <br/> HLWPS495TAMBE-11 <br/> HW 410AMBCB/1-80 <br/> HWE 49AMBS/1-S | CO4 107T1/2-07 <br/> CBWO49TWME-S <br/> RO14126DWMST-S <br/> RO441286DWMC4-07 <br/> HW 68AMC/1-80 <br/> HWPD 69AMBC/1-S |
|
| **Washing Machine** | HW80-B14959TU1DE <br/> HW80-B14959TU1IT <br/> HW80-B14979TU1 <br/> HW90-B14TEAM5 <br/> HW90G-BD14979UD <br/> HW100-B14959U1 <br/> HW110-14979 | H-WASH 500 <br/> H7W4 48MBC-S <br/> HLWPS495TAMBE-11 <br/> HW 410AMBCB/1-80 <br/> HWE 49AMBS/1-S | CO4 107T1/2-07 <br/> CBWO49TWME-S <br/> RO14126DWMST-S <br/> RO441286DWMC4-07 <br/> HW 68AMC/1-80 <br/> HWPD 69AMBC/1-S |
|
||||||
| **Tumble Dryer** | HD80-A3959 <br/> HD90-A3TEAM5 <br/> HD90-A2959 | H-DRY 500 <br/> H9A3TCBEXS-S <br/> HLE C10DCE-80 <br/> H5WPB447AMBC/1-S <br/> NDE H10A2TCE-80 <br/> NDE H9A2TSBEXS-S <br/> NDPHY10A2TCBEXSS | BCTDH7A1TE <br/> CSOE C10DE-80 <br/> ROE H9A3TCEX-S <br/> ROE H10A2TCE-07 |
|
| **Tumble Dryer** | HD80-A3959 <br/> HD90-A3TEAM5 <br/> HD90-A2959 | H-DRY 500 <br/> H9A3TCBEXS-S <br/> HLE C10DCE-80 <br/> H5WPB447AMBC/1-S <br/> NDE H10A2TCE-80 <br/> NDE H9A2TSBEXS-S <br/> NDPHY10A2TCBEXSS | BCTDH7A1TE <br/> CSOE C10DE-80 <br/> ROE H9A3TCEX-S <br/> ROE H10A2TCE-07 |
|
||||||
| **Washer Dryer** | HWD100-B14979 <br/> HWD100-B14978 | HD 485AMBB/1-S <br/> HD 495AMC/1-S <br/> HD 4106AMC/1-80 <br/> HDQ 496AMBS/1-S <br/> HWPS4954DAMR-11 | RPW41066BWMR/1-S |
|
| **Washer Dryer** | HWD100-B14979 <br/> HWD100-B14978 | HD 485AMBB/1-S <br/> HD 495AMC/1-S <br/> HD 4106AMC/1-80 <br/> HDQ 496AMBS/1-S <br/> HWPS4954DAMR-11 | RPW41066BWMR/1-S |
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
black
|
homeassistant~=2023.10.0b2
|
||||||
flake8
|
black~=23.7.0
|
||||||
mypy
|
flake8~=6.0.0
|
||||||
pylint
|
mypy~=1.4.1
|
||||||
|
pylint~=2.17.4
|
||||||
|
|
Loading…
Reference in a new issue