Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Fahrenheit in ZHA #78

Closed
scarolan opened this issue Nov 29, 2023 · 11 comments
Closed

Enable Fahrenheit in ZHA #78

scarolan opened this issue Nov 29, 2023 · 11 comments

Comments

@scarolan
Copy link

I'm not seeing a cluster for toggling between C and F.

I'm running the latest 1.0.6 firmware. Is it possible to change the display to Fahrenheit with ZHA?

@devbis
Copy link
Owner

devbis commented Nov 30, 2023

While I'm figuring out why it is not exposed to UI, you may try ZHA toolkit https://github.com/mdeweerd/zha-toolkit#attr_write-writeread-an-attribute-value and write 1 (Fahrenheit) to

  • endpoint 1
  • cluster 0x0204
  • attribute 0x0000
  • attr_type 0x30
  • value 1

@scarolan
Copy link
Author

Thanks @devbis - I tried the workaround but ZHA toolkit throws an error

image

Also am not seeing a 0x0204 cluster - there is an 0x0402 though?

image

@devbis
Copy link
Owner

devbis commented Dec 1, 2023

You should use 0x0204 Thermostat User Interface Configuration, which is absent in the list.
If you're sure you're using 1.0.6, it could be a filter on ZHA side.
Though, it is mentioned in zigpy: https://github.com/zigpy/zigpy/blob/dev/zigpy/zcl/clusters/hvac.py#L658-L670

@pvvx
Copy link

pvvx commented Dec 1, 2023

https://github.com/mdeweerd/zha-toolkit/blob/main/custom_components/zha_toolkit/utils.py#L444
Log:
Exception: No endpoint None and no cluster 0x0204 for 'a4:c1:38:0b:5e:ed:c6:97'

The ZHA toolkit can't access other clusters it doesn't want to :)

@scarolan
Copy link
Author

scarolan commented Dec 1, 2023

No worries, I can wait. The degrees on the display is not mission critical for my use case.

@devbis
Copy link
Owner

devbis commented Dec 27, 2023

@scarolan At last I was able to check switching to degrees Fahrenheit in ZHA. Unfortunately, raw zha just ignores cluster 0x0204, so I used zha-toolkit. (ieee - any entity from the device, battery, temperature, humidity, doesn't matter)

service: zha_toolkit.attr_write
data:
  ieee: sensor.xiaomi_lywsd03mmc_battery
  cluster: 516
  attribute: 0
  attr_val: "1"

I used developer mode to run services. Can you please try it?

Screenshot 2023-12-28 at 02 03 43

@pvvx
Copy link

pvvx commented Dec 27, 2023

Unfortunately, raw zha just ignores cluster 0x0204, so I used zha-toolkit.

The cluster 0x0204 is not declared in the lists in the firmware.
pvvx/ZigbeeTLc#28
pvvx/ZigbeeTLc#30

image

@scarolan
Copy link
Author

scarolan commented Jan 5, 2024

Nice! What should I put for "Target Cluster"? I tried 516 like the example but didn't get a result.

@scarolan
Copy link
Author

I'm good with BLE for now, will keep my single Celsius Zigbee device for quick reference ;-)

@devbis
Copy link
Owner

devbis commented Feb 7, 2024

@scarolan The latest firmware supports switching via 1 sec pressing on reset-gnd contacts.
And switching via cluster attribute is also fixed.

@scarolan
Copy link
Author

Nice work, @devbis!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants