Commit graph

219 commits

Author SHA1 Message Date
danyrd92 e01d19efd6
Add Preheat Binary Sensor for Ovens + Fix Attribute Handling for Binary Sensors (#17)
This PR introduces a new binary sensor for Haier ovens based on the preheatStatus attribute. While implementing this feature, I discovered that the integration does not correctly evaluate certain appliance attributes, which caused binary sensors to always report off even when the underlying value indicated they should be on.

Issue Identified

Attributes such as preheatStatus and onOffStatus are not returned as raw integers. Instead, the integration receives them as HonAttribute objects. Because the existing logic compares the object itself directly against the expected value, the expression value == on_value always evaluates to False.

Fix Implemented

To ensure proper evaluation, the binary sensor logic has been updated so that when an attribute is a HonAttribute instance, the sensor extracts its actual value using:

value = attr.value if hasattr(attr, "value") else attr


This fix has been applied to both:

is_on()

_handle_coordinator_update()

As a result, the newly added preheatStatus sensor works correctly, and the previously existing onOffStatus binary sensor now functions reliably as well.

Potential Impact on Other Sensors

This change may also correct the behavior of other binary sensors that rely on attributes following the same pattern. I cannot verify all of them because I only have access to a single Haier oven, but the patch is safe, backward-compatible, and should improve the accuracy of any affected entities.
2025-12-16 17:37:03 +01:00
Michał Małolepszy d0bca2fd17 Bump version v0.16.1 2025-11-10 00:57:04 +01:00
Michał Małolepszy c0de32cc24
Update pyhon library to pyhon-revived@v0.18.1 (#13)
* Update docs

* Update pyhon library to v0.18.1
2025-11-10 00:27:41 +01:00
Michał Małolepszy 19fa6a9bae Remove 3 of 4 added earlier sensors as they don't show anything 2025-10-24 19:12:57 +02:00
Michał Małolepszy 2b82de679d Expose 4 AC entities 2025-10-14 00:13:56 +02:00
Michał Małolepszy 4c44f6df5c Fix error message appearing when turning off AC unit. 2025-09-29 13:14:12 +02:00
Michał Małolepszy d4a9066f36 Update manifest 2025-09-28 19:56:57 +02:00
Michał Małolepszy dea2bc86ce Fix unit of measure warning for washing mashine current electricity usage 2025-06-26 01:04:02 +02:00
Michał Małolepszy 0823793977 Fix automatic updates of entities 2025-06-26 01:02:47 +02:00
Michał Małolepszy 7114a6578d Fix incompatibility with HA 2025.6 2025-06-26 01:00:29 +02:00
Michał Małolepszy 7a5db6ec6f Fix HomeAssistantType deprecation warning 2025-06-26 00:59:54 +02:00
Andre Basche 70eb6c0111
Update manifest.json 2024-08-14 22:51:18 +02:00
Andre Basche 9bab35f8c4
Update manifest.json 2024-08-14 22:46:43 +02:00
Andre Basche 6906e751b1 Bump version 2024-04-09 22:49:49 +02:00
Andre Basche 6d2a6ce2e9 Fix unit of current elecricity #158 2024-03-30 23:16:54 +01:00
Andre Basche 0e166f3c66 Bump version 2024-03-30 20:26:08 +01:00
Andre Basche 54dd406ec2 Fix checks 2024-03-30 20:25:08 +01:00
Andre Basche a746584833 Fix unkown for 0 in number entity 2024-03-30 20:23:39 +01:00
Andre Basche 36aed2e6ea Fix update entity when changing config 2024-03-30 19:47:46 +01:00
Andre Basche 510c10bd9f Improve device info 2024-03-30 19:46:24 +01:00
Andre Basche 09189ff0f8 Change to new climate enity style, fix #165 2024-03-30 17:29:25 +01:00
Andre Basche 0e26b4a0f7 Fix applance connection handling 2024-03-29 14:48:35 +01:00
Andre Basche a6c2c3e992 Rebuild to single data coordinator 2024-03-29 01:22:44 +01:00
Andre Basche 8f1fc627e6 Bump version 2024-03-26 00:21:42 +01:00
Andre Basche c46171114f Change poll to push 2024-03-25 02:26:20 +01:00
Andre Basche 20d467a2d5 Fix checks 2024-03-18 01:19:49 +01:00
Andre Basche 38a67ad64c Small improvements 2024-03-18 01:12:52 +01:00
Andre Basche 6e8576c7bd Add FRE appliances, #177 2024-03-17 23:54:50 +01:00
Andre Basche 1a78251a93 Update translations 2024-03-17 21:52:54 +01:00
Felix Limbach 73b446eb22 Fix crash when wash-dryer enters phase 8
Added a constant for phase 8
2024-03-17 21:13:44 +01:00
Andre Basche cbaf9f13b4 Bump version 2024-02-11 05:24:34 +01:00
Andre Basche d175e19c3b Safe refresh token 2024-02-11 05:06:53 +01:00
Andre Basche 8694882c45 Set refresh token and mobile id 2024-02-10 01:02:26 +01:00
Andre Basche 8f0483ead2 Update translations 2024-02-02 22:13:43 +01:00
Andre Basche 9870de2a42
Bump version 2024-01-29 19:46:18 +01:00
Andre Basche 2a5be2e657
Set polling to 60 seconds 2024-01-29 19:44:05 +01:00
Andre Basche ed8b5e7d3c Bump version 2024-01-11 02:12:07 +01:00
Andre Basche f007777689 Fix mypy checks 2024-01-11 00:41:49 +01:00
Andre Basche e01017125e Replace deprecated TEMP_CLESIUS, fix #141 2024-01-11 00:23:08 +01:00
Andre Basche f19c0cfcd2 Bump version 2023-11-21 02:32:53 +01:00
Andre Basche fb15e4bce7 Move config sensors to diagnose #123 2023-11-21 01:32:01 +01:00
Andre Basche 11133c148b Fix black issue 2023-11-20 17:44:28 +01:00
Andre Basche 58ae497933 Update translations 2023-11-20 17:37:49 +01:00
Andre Basche e67b9ff5b1 Add fresh zone for ref #126 2023-11-20 17:35:58 +01:00
Andre Basche a00b80be95 Fix mypy errors 2023-11-20 16:39:33 +01:00
Andre Basche 10bcc486e4 Bump dependencies 2023-11-20 15:26:33 +01:00
Andre Basche 7c8f7e62db Try to fix #117 2023-10-06 01:33:23 +02:00
Andre Basche 735a83673c Bump version 2023-10-03 01:59:23 +02:00
Andre Basche 08fb9cb5b9 Add changing fan position for ac #97 #108 2023-10-03 01:49:24 +02:00
Andre Basche 5e17081feb Add Stain Type #105 2023-10-02 03:33:45 +02:00