Could you please share this working ZHA quirk?
Here it is, I hope pastebin doesn’t ruin the formatting: """Beca TRV devices support."""import loggingfrom typing import Optional, - Pastebin.com
This is totally Rofo’s work, I take no credit.
Hi All,
Trying to get the exact same TRV to work with my HA instance via ZHA. I’ve tried using this BECA custom quirk but it still doesn’t seem to allow me to ‘push’ any configuration to the device at all, just reading the ambient temperature and current target temperature.
I’m really surprised (given how common this TRV seems to be) that ZHA don’t fully support it.
Is there any way to easily debug problems?
There is another quirk for the device here,
See also ZHA - ZigPy - Thermostatic valve TS0601 doesn't work - #17 by highsciguy
I compared with the one from the Pastebin above and find that there are only a few differences in the code. The major difference being the addition of an array “server_commands” in the Github version.
I have not tried the above quirk yet, but I can tell that the upstream ZHA implementation does not push any configuration at all and also simple things like battery state info do not work (if you see that, the custom quirk may not be active).
I also have issues with the custom quirk though. Among others, the device, although re-initialized, always returns to a schedule and starts to heat after some time. I do not find means to disable that via ZHA. However, I can at least temporarily set the temperature, toggle the child lock, open window detection and so on. I will test the Pastebin version in the coming days.
FYI, I had a go with that custom quirk and it was still not happy.
I decided to take a punt and spin up Zigbee2MQTT in a docker container and pair it up to that - it worked immediately.
I think I’m probably going to move my whole Zigbee setup over to that instead of using ZHA as it seems to be a more focussed project and can be operated in it’s own right.
It also works really well with HA from what I’ve seen.
Indeed that looks somewhat more organized. The Zigbee2MQTT “converter file” for the device appears to be https://github.com/Koenkk/zigbee-herdsman-converters/blob/89fd37d7fc0715e62fb6e62e83a9fc48cbb31fba/devices/tuya.js
It has much less low level code than the quirk, likely because it reuses generic code shared between tuya devices etc.
The quirk I originally posted and tweaked no longer works. It seems it requires the new section thats in the quirk linked to by @highsciguy.
Initial testing seems to show it working.
I’m sorry, but I don’t understand what that means. Moes TRV can only work with zigbee2mqtt now?
No. ZHA still works using this revised quirk:
Thank you. You’re a magician sir!
You made my day, thank you so much! …how do you do that?
Hi @Rofo,
I am trying to get an automation to work with the device, but I cannot figure how to control the target temperature on the thermostat…
I am just trying to create a script, selecting the device and I have available actions against all attributes but the target temperature of the thermostat…
Have you observed that and do you have any idea how to solve this?
And all the best for 2024!
Cheers
OK… This was just me not understanding how this works yet…
Answer: You need to use the Climate: Set target temperature
service
eg.
alias: Set downstairs temperature to day time
sequence:
- service: climate.set_temperature
target:
entity_id: climate.xxxx
data:
temperature: 21
mode: single
icon: mdi:thermometer-low
Hey,
i recently bought two BRT-100 TRVs. After i add them to my ZHA i just got two entities.
I found this thread and added the custom quirk for the the beca trv. Now i maybe got all the entities. But some things are not working as intendent i guess.
-
The Window Detection Switch just activate the feature, but is it possible to set the mode “window is open” with an external sensor? I though there should be one more entity for this.
-
Im able to control the temperature, but im not able to set the preset mode. If i change the mode on the valve directly it updates in HA, but not the other way around.
-
what is the binary sensor stands for? I guess its something like the state of the window? But i dont no what exactly.
Thanks
The “Window Detection” turns on or off the window open detection, the binary sensor is whether an open window has been detected.
I don’t use the presets, so can’t help with that.
When using it with better thermostat integration and with contact sensor that can determine is window or door opened, it works. It will turn off trv if window or door is opened and restore trv back to its set temperature once window or door is closed.
I’m using automation for that.
Ok, got it…i control the Window Detection by an Automation or Better Thermostat.
No or. Better thermostat integration and automation. This trv have no off mode and that why you need this integration. To turn it back on use automation.
This is mine automation for turning it back on.
alias: Luka bedroom radiator
description: Turn on radiator when balcony door is closed
trigger:
- platform: state
entity_id:
- binary_sensor.luka_balcony_door_sensor_contact
from: "on"
to: "off"
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.buderus_hk1_sommer_modus
state: "off"
- condition: state
entity_id: climate.luka_bedroom_radiator_2
state: "off"
sequence:
- service: climate.turn_on
data: {}
target:
entity_id: climate.luka_bedroom_radiator_2
mode: single
I managed to got it running. Im not using better Thermostat becauae its Overkill for my usecase, so im using an automation blueprint called “Advanced Heating Control”.
Since this automation Supports an external Sensor, i tried to sync it with the trv via the temperature_calibration attribute.
But now i See some issues with the Update ratio, the Temperature at the Sensor isnt properly Update to home Assistant.
I guess this is an common issue, anybody else got this issue and maybe got an workaround?
Thanks for everyone participating in this discussion and working towards a fix! I have a MOES ZTRV-BY-100 and the quirk zha_quirks/ts0601_trv_beca.py at 9c6eebf6bf2c31f20ad0d6ccb1d855109cb7841e · jacekk015/zha_quirks · GitHub also works for the most basic functions for me. Now I can set the temperature via an automation, which is great. Some things are not working (setting min temp, %valve…) but that’s ok.
These quirks with ZHA keep staying fascinating - you get something and are low key afraid you will put it on the “need to find a fix” pile but then it just works In this case I’m especially happy, since I really like the looks of the Moes TRVs