Compare commits
	
		
			3 Commits
		
	
	
		
			v0.7.2
			...
			v0.7.3-bet
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 6828f3e9a8 | |||
| a56d3e5f88 | |||
| 240dc85ff3 | 
							
								
								
									
										19
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								README.md
									
									
									
									
									
								
							| @ -40,6 +40,7 @@ Support was confirmed for these models. If a supported model is missing, please | |||||||
| - Candy CIS633SCTTWIFI | - Candy CIS633SCTTWIFI | ||||||
| - Haier XIB 3B2SFS-80 | - Haier XIB 3B2SFS-80 | ||||||
| - Haier XIB 6B2D3FB | - Haier XIB 6B2D3FB | ||||||
|  | - Hoover HSOT3161WG | ||||||
|  |  | ||||||
| ## Supported Languages | ## Supported Languages | ||||||
| Translation of internal names like programs are available for all languages which are official supported by the hOn app: | Translation of internal names like programs are available for all languages which are official supported by the hOn app: | ||||||
| @ -291,10 +292,10 @@ I moved the api related stuff into the package [pyhOn](https://github.com/Andre0 | |||||||
| | Dry Time | `timer` | `select` | `startProgram.dryTimeMM` | | | Dry Time | `timer` | `select` | `startProgram.dryTimeMM` | | ||||||
| | Dry level | `hair-dryer` | `select` | `startProgram.dryLevel` | | | Dry level | `hair-dryer` | `select` | `startProgram.dryLevel` | | ||||||
| | Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | | | Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | | ||||||
| | Extra Rinse 1 | `numeric-1-box-multiple-outline` | `switch` | `extraRinse1` | | | Extra Rinse 1 | `numeric-1-box-multiple-outline` | `switch` | `startProgram.extraRinse1` | | ||||||
| | Extra Rinse 2 | `numeric-2-box-multiple-outline` | `switch` | `extraRinse2` | | | Extra Rinse 2 | `numeric-2-box-multiple-outline` | `switch` | `startProgram.extraRinse2` | | ||||||
| | Extra Rinse 3 | `numeric-3-box-multiple-outline` | `switch` | `extraRinse3` | | | Extra Rinse 3 | `numeric-3-box-multiple-outline` | `switch` | `startProgram.extraRinse3` | | ||||||
| | Good Night | `weather-night` | `switch` | `goodNight` | | | Good Night | `weather-night` | `switch` | `startProgram.goodNight` | | ||||||
| | Keep Fresh | `refresh-circle` | `switch` | `startProgram.autoSoftenerStatus` | | | Keep Fresh | `refresh-circle` | `switch` | `startProgram.autoSoftenerStatus` | | ||||||
| | 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` | | ||||||
| @ -321,6 +322,7 @@ I moved the api related stuff into the package [pyhOn](https://github.com/Andre0 | |||||||
| | Acqua Plus |  | `binary_sensor` | `acquaplus` | | | Acqua Plus |  | `binary_sensor` | `acquaplus` | | ||||||
| | Anti-Crease |  | `binary_sensor` | `anticrease` | | | Anti-Crease |  | `binary_sensor` | `anticrease` | | ||||||
| | Current Electricity Used | `lightning-bolt` | `sensor` | `currentElectricityUsed` | | | Current Electricity Used | `lightning-bolt` | `sensor` | `currentElectricityUsed` | | ||||||
|  | | Current Temperature | `thermometer` | `sensor` | `temp` | | ||||||
| | Current Water Used | `water` | `sensor` | `currentWaterUsed` | | | Current Water Used | `water` | `sensor` | `currentWaterUsed` | | ||||||
| | Dirt level | `liquid-spot` | `sensor` | `dirtyLevel` | | | Dirt level | `liquid-spot` | `sensor` | `dirtyLevel` | | ||||||
| | Door |  | `binary_sensor` | `doorStatus` | | | Door |  | `binary_sensor` | `doorStatus` | | ||||||
| @ -359,10 +361,10 @@ I moved the api related stuff into the package [pyhOn](https://github.com/Andre0 | |||||||
| | Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` | | | Delay Status | `timer-check` | `switch` | `startProgram.delayStatus` | | ||||||
| | Delay Time | `timer-plus` | `number` | `startProgram.delayTime` | | | Delay Time | `timer-plus` | `number` | `startProgram.delayTime` | | ||||||
| | Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | | | Energy Label | `lightning-bolt-circle` | `sensor` | `startProgram.energyLabel` | | ||||||
| | Extra Rinse 1 | `numeric-1-box-multiple-outline` | `switch` | `extraRinse1` | | | Extra Rinse 1 | `numeric-1-box-multiple-outline` | `switch` | `startProgram.extraRinse1` | | ||||||
| | Extra Rinse 2 | `numeric-2-box-multiple-outline` | `switch` | `extraRinse2` | | | Extra Rinse 2 | `numeric-2-box-multiple-outline` | `switch` | `startProgram.extraRinse2` | | ||||||
| | Extra Rinse 3 | `numeric-3-box-multiple-outline` | `switch` | `extraRinse3` | | | Extra Rinse 3 | `numeric-3-box-multiple-outline` | `switch` | `startProgram.extraRinse3` | | ||||||
| | Good Night | `weather-night` | `switch` | `goodNight` | | | Good Night | `weather-night` | `switch` | `startProgram.goodNight` | | ||||||
| | Keep Fresh | `refresh-circle` | `switch` | `startProgram.autoSoftenerStatus` | | | Keep Fresh | `refresh-circle` | `switch` | `startProgram.autoSoftenerStatus` | | ||||||
| | 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` | | ||||||
| @ -383,6 +385,7 @@ I moved the api related stuff into the package [pyhOn](https://github.com/Andre0 | |||||||
| | --- | --- | --- | --- | | | --- | --- | --- | --- | | ||||||
| | Acqua Plus |  | `binary_sensor` | `acquaplus` | | | Acqua Plus |  | `binary_sensor` | `acquaplus` | | ||||||
| | Current Electricity Used | `lightning-bolt` | `sensor` | `currentElectricityUsed` | | | Current Electricity Used | `lightning-bolt` | `sensor` | `currentElectricityUsed` | | ||||||
|  | | Current Temperature | `thermometer` | `sensor` | `temp` | | ||||||
| | Current Water Used | `water` | `sensor` | `currentWaterUsed` | | | Current Water Used | `water` | `sensor` | `currentWaterUsed` | | ||||||
| | Dirt level | `liquid-spot` | `sensor` | `dirtyLevel` | | | Dirt level | `liquid-spot` | `sensor` | `dirtyLevel` | | ||||||
| | Door |  | `binary_sensor` | `doorStatus` | | | Door |  | `binary_sensor` | `doorStatus` | | ||||||
|  | |||||||
| @ -64,6 +64,11 @@ class HonButtonEntity(HonEntity, ButtonEntity): | |||||||
|     async def async_press(self) -> None: |     async def async_press(self) -> None: | ||||||
|         await self._device.commands[self.entity_description.key].send() |         await self._device.commands[self.entity_description.key].send() | ||||||
|  |  | ||||||
|  |     @property | ||||||
|  |     def available(self) -> bool: | ||||||
|  |         """Return True if entity is available.""" | ||||||
|  |         return super().available and self._device.get("remoteCtrValid") == "1" | ||||||
|  |  | ||||||
|  |  | ||||||
| class HonFeatureRequestButton(HonEntity, ButtonEntity): | class HonFeatureRequestButton(HonEntity, ButtonEntity): | ||||||
|     def __init__(self, hass, coordinator, entry, device: HonAppliance) -> None: |     def __init__(self, hass, coordinator, entry, device: HonAppliance) -> None: | ||||||
| @ -80,8 +85,3 @@ class HonFeatureRequestButton(HonEntity, ButtonEntity): | |||||||
|         pyhon_version = pkg_resources.get_distribution("pyhon").version |         pyhon_version = pkg_resources.get_distribution("pyhon").version | ||||||
|         info = f"Device Info:\n{self._device.diagnose}pyhOnVersion: {pyhon_version}" |         info = f"Device Info:\n{self._device.diagnose}pyhOnVersion: {pyhon_version}" | ||||||
|         _LOGGER.error(info) |         _LOGGER.error(info) | ||||||
|  |  | ||||||
|     @property |  | ||||||
|     def available(self) -> bool: |  | ||||||
|         """Return True if entity is available.""" |  | ||||||
|         return super().available and self._device.get("remoteCtrValid") == "1" |  | ||||||
|  | |||||||
| @ -130,8 +130,8 @@ class HonClimateEntity(HonEntity, ClimateEntity): | |||||||
|  |  | ||||||
|     @callback |     @callback | ||||||
|     def _handle_coordinator_update(self, update=True) -> None: |     def _handle_coordinator_update(self, update=True) -> None: | ||||||
|         # self._attr_target_temperature = int(float(self._device.get("tempSel"))) |         self._attr_target_temperature = int(float(self._device.get("tempSel"))) | ||||||
|         # self._attr_current_temperature = float(self._device.get("tempIndoor")) |         self._attr_current_temperature = float(self._device.get("tempIndoor")) | ||||||
|         self._attr_max_temp = self._device.settings["settings.tempSel"].max |         self._attr_max_temp = self._device.settings["settings.tempSel"].max | ||||||
|         self._attr_min_temp = self._device.settings["settings.tempSel"].min |         self._attr_min_temp = self._device.settings["settings.tempSel"].min | ||||||
|  |  | ||||||
|  | |||||||
| @ -7,5 +7,5 @@ | |||||||
|   "iot_class": "cloud_polling", |   "iot_class": "cloud_polling", | ||||||
|   "issue_tracker": "https://github.com/Andre0512/hon/issues", |   "issue_tracker": "https://github.com/Andre0512/hon/issues", | ||||||
|  "requirements": ["pyhOn==0.10.6"], |  "requirements": ["pyhOn==0.10.6"], | ||||||
|   "version": "0.7.2" |   "version": "0.7.3-beta.2" | ||||||
| } | } | ||||||
|  | |||||||
| @ -161,6 +161,14 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { | |||||||
|             native_unit_of_measurement=UnitOfMass.KILOGRAMS, |             native_unit_of_measurement=UnitOfMass.KILOGRAMS, | ||||||
|             translation_key="suggested_load", |             translation_key="suggested_load", | ||||||
|         ), |         ), | ||||||
|  |         SensorEntityDescription( | ||||||
|  |             key="temp", | ||||||
|  |             name="Current Temperature", | ||||||
|  |             icon="mdi:thermometer", | ||||||
|  |             state_class=SensorStateClass.MEASUREMENT, | ||||||
|  |             native_unit_of_measurement=UnitOfTemperature.CELSIUS, | ||||||
|  |             translation_key="temperature", | ||||||
|  |         ), | ||||||
|     ), |     ), | ||||||
|     "TD": ( |     "TD": ( | ||||||
|         SensorEntityDescription( |         SensorEntityDescription( | ||||||
|  | |||||||
| @ -82,28 +82,28 @@ SWITCHES: dict[str, tuple[HonSwitchEntityDescription, ...]] = { | |||||||
|             translation_key="acqua_plus", |             translation_key="acqua_plus", | ||||||
|         ), |         ), | ||||||
|         HonSwitchEntityDescription( |         HonSwitchEntityDescription( | ||||||
|             key="extraRinse1", |             key="startProgram.extraRinse1", | ||||||
|             name="Extra Rinse 1", |             name="Extra Rinse 1", | ||||||
|             entity_category=EntityCategory.CONFIG, |             entity_category=EntityCategory.CONFIG, | ||||||
|             icon="mdi:numeric-1-box-multiple-outline", |             icon="mdi:numeric-1-box-multiple-outline", | ||||||
|             translation_key="extra_rinse_1", |             translation_key="extra_rinse_1", | ||||||
|         ), |         ), | ||||||
|         HonSwitchEntityDescription( |         HonSwitchEntityDescription( | ||||||
|             key="extraRinse2", |             key="startProgram.extraRinse2", | ||||||
|             name="Extra Rinse 2", |             name="Extra Rinse 2", | ||||||
|             entity_category=EntityCategory.CONFIG, |             entity_category=EntityCategory.CONFIG, | ||||||
|             icon="mdi:numeric-2-box-multiple-outline", |             icon="mdi:numeric-2-box-multiple-outline", | ||||||
|             translation_key="extra_rinse_2", |             translation_key="extra_rinse_2", | ||||||
|         ), |         ), | ||||||
|         HonSwitchEntityDescription( |         HonSwitchEntityDescription( | ||||||
|             key="extraRinse3", |             key="startProgram.extraRinse3", | ||||||
|             name="Extra Rinse 3", |             name="Extra Rinse 3", | ||||||
|             entity_category=EntityCategory.CONFIG, |             entity_category=EntityCategory.CONFIG, | ||||||
|             icon="mdi:numeric-3-box-multiple-outline", |             icon="mdi:numeric-3-box-multiple-outline", | ||||||
|             translation_key="extra_rinse_3", |             translation_key="extra_rinse_3", | ||||||
|         ), |         ), | ||||||
|         HonSwitchEntityDescription( |         HonSwitchEntityDescription( | ||||||
|             key="goodNight", |             key="startProgram.goodNight", | ||||||
|             name="Good Night", |             name="Good Night", | ||||||
|             icon="mdi:weather-night", |             icon="mdi:weather-night", | ||||||
|             entity_category=EntityCategory.CONFIG, |             entity_category=EntityCategory.CONFIG, | ||||||
| @ -323,15 +323,21 @@ async def async_setup_entry(hass, entry: ConfigEntry, async_add_entities) -> Non | |||||||
|  |  | ||||||
|         if descriptions := SWITCHES.get(device.appliance_type): |         if descriptions := SWITCHES.get(device.appliance_type): | ||||||
|             for description in descriptions: |             for description in descriptions: | ||||||
|                 if ( |                 if description.entity_category == EntityCategory.CONFIG: | ||||||
|                     device.get(description.key) is not None |                     if description.key not in device.available_settings: | ||||||
|                     or description.key in device.available_settings |                         continue | ||||||
|                     or description.turn_on_key in list(device.commands) |                 else: | ||||||
|                     or description.turn_off_key in list(device.commands) |                     if not any( | ||||||
|                 ): |                         [ | ||||||
|                     appliances.extend( |                             device.get(description.key) is not None, | ||||||
|                         [HonSwitchEntity(hass, coordinator, entry, device, description)] |                             description.turn_on_key in list(device.commands), | ||||||
|                     ) |                             description.turn_off_key in list(device.commands), | ||||||
|  |                         ] | ||||||
|  |                     ): | ||||||
|  |                         continue | ||||||
|  |                 appliances.extend( | ||||||
|  |                     [HonSwitchEntity(hass, coordinator, entry, device, description)] | ||||||
|  |                 ) | ||||||
|  |  | ||||||
|     async_add_entities(appliances) |     async_add_entities(appliances) | ||||||
|  |  | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								info.md
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								info.md
									
									
									
									
									
								
							| @ -29,6 +29,7 @@ Support was confirmed for these models. If a supported model is missing, please | |||||||
| - Candy CIS633SCTTWIFI | - Candy CIS633SCTTWIFI | ||||||
| - Haier XIB 3B2SFS-80 | - Haier XIB 3B2SFS-80 | ||||||
| - Haier XIB 6B2D3FB | - Haier XIB 6B2D3FB | ||||||
|  | - Hoover HSOT3161WG | ||||||
|  |  | ||||||
| ## Supported Languages | ## Supported Languages | ||||||
| Translation of internal names like programs are available for all languages which are official supported by the hOn app: | Translation of internal names like programs are available for all languages which are official supported by the hOn app: | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	