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
c11376f207
Merge branch 'main' of https://github.com/mmalolepszy/hon
2025-11-10 00:45:39 +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
5f87b65353
Update docs
2025-11-10 00:16:59 +01:00
Michał Małolepszy
476fac684e
Merge pull request #9 from mmalolepszy/new-ac-entities
...
Expose compressor frequency sensor for AC units
2025-10-24 19:16:44 +02: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
e3b4bc8cbb
Update README.md
2025-09-29 12:35:50 +02:00
Michał Małolepszy
4cd2292252
Update hacs.json
2025-09-28 20:21:37 +02:00
Michał Małolepszy
3960cad3b3
Merge branch 'main' of https://github.com/mmalolepszy/hon
2025-09-28 19:57:00 +02:00
Michał Małolepszy
d4a9066f36
Update manifest
2025-09-28 19:56:57 +02:00
Michał Małolepszy
d6cb90e4b9
Update README.md
2025-09-28 19:39:33 +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
zawadzkipiter
39fc30c95e
Update pyhon to 0.17.5
...
fix for HA "Can't login" based on:
https://github.com/Andre0512/pyhOn/pull/29
2024-08-14 22:46:10 +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
Andre Basche
ed19cf4b7b
Add more appliances
2024-03-17 21:21:03 +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
71d3d42efe
Update supported appliances
2024-02-02 22:34:04 +01:00
Andre Basche
8f0483ead2
Update translations
2024-02-02 22:13:43 +01:00
Andre Basche
a9e2cd0c05
Update reamde with latest development
2024-02-02 18:52:02 +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
Chad Wilson
15bf996404
Trivial typo fix
2024-01-25 15:36:33 +01:00
Andre Basche
64a68120c2
Fix response
2024-01-24 22:21:49 +01:00
Andre Basche
b0594aac93
Update infos
2024-01-24 22:16:32 +01:00