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

Bosch thermostat BTH-RA only Heating is shown as HVAC Mode in Home Assistant #22892

Closed
adidashi79 opened this issue Jun 2, 2024 · 29 comments
Closed
Labels
problem Something isn't working stale Stale issues

Comments

@adidashi79
Copy link

What happened?

After Update to 1.38.0-1 only one System Mode is shown with the Bosch Thermostats, only heat. Bevor the update, the Bosch-specific operating mode did override system mode and the three operating modes where shown (schedule/manual/paus as automatic/heat/off)and could be used in Home Assistant. In zigbee2mqtt everything does show up.

What did you expect to happen?

See above, so have the three modes heat, automatic and off in Home Assistant.

How to reproduce it (minimal and precise)

Open climate control and try to switch Mode.

Zigbee2MQTT version

1.38.0

Adapter firmware version

20210708

Adapter

Sonor P

Setup

Add-on Home Assistant OS

Debug log

[2024-06-02 15:48:08] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":134,"color":{"x":0.15260547798886093,"y":0.055405508506904705},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:08] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":134,"color":{"x":0.15260547798886093,"y":0.055405508506904705},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:08] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":147,"color":{"x":0.1527122911421378,"y":0.06001373311970703},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:08] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":147,"color":{"x":0.1527122911421378,"y":0.06001373311970703},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":134,"color":{"x":0.15260547798886093,"y":0.055725947966735336},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":134,"color":{"x":0.15260547798886093,"y":0.055725947966735336},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":147,"color":{"x":0.1527275501640345,"y":0.060318913557640956},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":147,"color":{"x":0.1527275501640345,"y":0.060318913557640956},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":147,"color":{"x":0.1527122911421378,"y":0.059693293659876405},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":147,"color":{"x":0.1527122911421378,"y":0.059693293659876405},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":134,"color":{"x":0.15260547798886093,"y":0.055725947966735336},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":134,"color":{"x":0.15260547798886093,"y":0.055725947966735336},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":146,"color":{"x":0.1527122911421378,"y":0.059693293659876405},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":146,"color":{"x":0.1527122911421378,"y":0.059693293659876405},"color_mode":"xy","color_temp":500,"linkquality":123,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":134,"color":{"x":0.15260547798886093,"y":0.055405508506904705},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":134,"color":{"x":0.15260547798886093,"y":0.055405508506904705},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":145,"color":{"x":0.1527122911421378,"y":0.05952544441901274},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":145,"color":{"x":0.1527122911421378,"y":0.05952544441901274},"color_mode":"xy","color_temp":500,"linkquality":123,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":145,"color":{"x":0.1526970321202411,"y":0.05922026398107881},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":145,"color":{"x":0.1526970321202411,"y":0.05922026398107881},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":135,"color":{"x":0.15260547798886093,"y":0.055405508506904705},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":135,"color":{"x":0.15260547798886093,"y":0.055405508506904705},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":145,"color":{"x":0.1527122911421378,"y":0.05952544441901274},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:09] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":145,"color":{"x":0.1527122911421378,"y":0.05952544441901274},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":145,"color":{"x":0.1526970321202411,"y":0.05922026398107881},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":145,"color":{"x":0.1526970321202411,"y":0.05922026398107881},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":136,"color":{"x":0.15260547798886093,"y":0.055405508506904705},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":136,"color":{"x":0.15260547798886093,"y":0.055405508506904705},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":136,"color":{"x":0.15260547798886093,"y":0.055405508506904705},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":136,"color":{"x":0.15262073701075762,"y":0.05604638742656596},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":136,"color":{"x":0.15262073701075762,"y":0.05604638742656596},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":145,"color":{"x":0.1526970321202411,"y":0.05922026398107881},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":145,"color":{"x":0.1526970321202411,"y":0.05922026398107881},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":136,"color":{"x":0.15263599603265432,"y":0.05667200732433051},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":136,"color":{"x":0.15263599603265432,"y":0.05667200732433051},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":145,"color":{"x":0.1526817730983444,"y":0.05889982452124819},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":145,"color":{"x":0.1526817730983444,"y":0.05889982452124819},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":136,"color":{"x":0.15262073701075762,"y":0.05636682688639658},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:10] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":136,"color":{"x":0.15262073701075762,"y":0.05636682688639658},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":145,"color":{"x":0.1526817730983444,"y":0.05857938506141756},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":145,"color":{"x":0.1526817730983444,"y":0.05857938506141756},"color_mode":"xy","color_temp":500,"linkquality":117,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":136,"color":{"x":0.15262073701075762,"y":0.05604638742656596},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":136,"color":{"x":0.15262073701075762,"y":0.05604638742656596},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":145,"color":{"x":0.1526817730983444,"y":0.05889982452124819},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":145,"color":{"x":0.1526817730983444,"y":0.05889982452124819},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":145,"color":{"x":0.1526970321202411,"y":0.05922026398107881},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":145,"color":{"x":0.1526970321202411,"y":0.05922026398107881},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":137,"color":{"x":0.15262073701075762,"y":0.05604638742656596},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":137,"color":{"x":0.15262073701075762,"y":0.05604638742656596},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":146,"color":{"x":0.1527122911421378,"y":0.05952544441901274},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":146,"color":{"x":0.1527122911421378,"y":0.05952544441901274},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":137,"color":{"x":0.15262073701075762,"y":0.05604638742656596},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":137,"color":{"x":0.15262073701075762,"y":0.05604638742656596},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":146,"color":{"x":0.1527122911421378,"y":0.059693293659876405},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":146,"color":{"x":0.1527122911421378,"y":0.059693293659876405},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":137,"color":{"x":0.15262073701075762,"y":0.05636682688639658},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":137,"color":{"x":0.15262073701075762,"y":0.05636682688639658},"color_mode":"xy","color_temp":500,"linkquality":138,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":147,"color":{"x":0.1527122911421378,"y":0.059693293659876405},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":147,"color":{"x":0.1527122911421378,"y":0.059693293659876405},"color_mode":"xy","color_temp":500,"linkquality":117,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":136,"color":{"x":0.15262073701075762,"y":0.05636682688639658},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:11] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":136,"color":{"x":0.15262073701075762,"y":0.05636682688639658},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":148,"color":{"x":0.1527122911421378,"y":0.059693293659876405},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":148,"color":{"x":0.1527122911421378,"y":0.059693293659876405},"color_mode":"xy","color_temp":500,"linkquality":117,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":149,"color":{"x":0.1527122911421378,"y":0.05952544441901274},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":149,"color":{"x":0.1527122911421378,"y":0.05952544441901274},"color_mode":"xy","color_temp":500,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":129,"color":{"x":0.1527275501640345,"y":0.06063935301747158},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":129,"color":{"x":0.1527275501640345,"y":0.06063935301747158},"color_mode":"xy","color_temp":500,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":132,"color":{"x":0.15292591744869155,"y":0.06810101472495612},"color_mode":"xy","color_temp":500,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":132,"color":{"x":0.15292591744869155,"y":0.06810101472495612},"color_mode":"xy","color_temp":500,"linkquality":117,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":92,"color":{"x":0.15376516365300985,"y":0.10012970168612192},"color_mode":"xy","color_temp":346,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":92,"color":{"x":0.15376516365300985,"y":0.10012970168612192},"color_mode":"xy","color_temp":346,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":90,"color":{"x":0.154360265506981,"y":0.11184863050278478},"color_mode":"xy","color_temp":266,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":90,"color":{"x":0.154360265506981,"y":0.11184863050278478},"color_mode":"xy","color_temp":266,"linkquality":117,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":69,"color":{"x":0.18030060273136492,"y":0.14938582436865797},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":69,"color":{"x":0.18030060273136492,"y":0.14938582436865797},"color_mode":"xy","color_temp":153,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":65,"color":{"x":0.18518348973830778,"y":0.1551842526894026},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":65,"color":{"x":0.18518348973830778,"y":0.1551842526894026},"color_mode":"xy","color_temp":153,"linkquality":138,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":64,"color":{"x":0.19067673762111848,"y":0.16433966582742046},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":64,"color":{"x":0.19067673762111848,"y":0.16433966582742046},"color_mode":"xy","color_temp":153,"linkquality":117,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":51,"color":{"x":0.22027924010070954,"y":0.20614938582436865},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":51,"color":{"x":0.22027924010070954,"y":0.20614938582436865},"color_mode":"xy","color_temp":153,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":50,"color":{"x":0.2239414053559167,"y":0.2119478141451133},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:12] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":50,"color":{"x":0.2239414053559167,"y":0.2119478141451133},"color_mode":"xy","color_temp":153,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":44,"color":{"x":0.24408331425955596,"y":0.24063477531090258},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":44,"color":{"x":0.24408331425955596,"y":0.24063477531090258},"color_mode":"xy","color_temp":153,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":43,"color":{"x":0.2456092164492256,"y":0.24338139925230792},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":43,"color":{"x":0.2456092164492256,"y":0.24338139925230792},"color_mode":"xy","color_temp":153,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":40,"color":{"x":0.2562905317769131,"y":0.25833524071107045},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":40,"color":{"x":0.2562905317769131,"y":0.25833524071107045},"color_mode":"xy","color_temp":153,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":40,"color":{"x":0.25690089265278093,"y":0.2598611429007401},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":40,"color":{"x":0.25690089265278093,"y":0.2598611429007401},"color_mode":"xy","color_temp":153,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":39,"color":{"x":0.2635690852216373,"y":0.26877241168841076},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":39,"color":{"x":0.2635690852216373,"y":0.26877241168841076},"color_mode":"xy","color_temp":153,"linkquality":141,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":39,"color":{"x":0.26332494087129016,"y":0.2681773098344396},"color_mode":"xy","color_temp":153,"state":"ON"}'
[2024-06-02 15:48:13] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":39,"color":{"x":0.26332494087129016,"y":0.2681773098344396},"color_mode":"xy","color_temp":153,"linkquality":120,"power_on_behavior":"off","state":"ON","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:14] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":39,"color":{"x":0.26332494087129016,"y":0.2681773098344396},"color_mode":"xy","color_temp":153,"linkquality":117,"power_on_behavior":"off","state":"OFF","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:14] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue PlayG', payload '{"brightness":39,"color":{"x":0.26332494087129016,"y":0.2681773098344396},"color_mode":"xy","color_temp":153,"state":"OFF"}'
[2024-06-02 15:48:14] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":39,"color":{"x":0.2635690852216373,"y":0.26877241168841076},"color_mode":"xy","color_temp":153,"linkquality":141,"power_on_behavior":"off","state":"OFF","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:40] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 1', payload '{"brightness":39,"color":{"x":0.26332494087129016,"y":0.2681773098344396},"color_mode":"xy","color_temp":153,"linkquality":120,"power_on_behavior":"off","state":"OFF","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:48:40] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue Play 2', payload '{"brightness":39,"color":{"x":0.2635690852216373,"y":0.26877241168841076},"color_mode":"xy","color_temp":153,"linkquality":141,"power_on_behavior":"off","state":"OFF","update":{"installed_version":16786432,"latest_version":16786432,"state":"idle"},"update_available":null}'
[2024-06-02 15:49:14] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Luftsensor Küche', payload '{"battery":100,"humidity":64.4,"linkquality":54,"temperature":20.4}'

@adidashi79 adidashi79 added the problem Something isn't working label Jun 2, 2024
@TheMagnetar
Copy link

@adidashi79
Copy link
Author

Thank you

@burmistrzak
Copy link

@adidashi79 This (and the reasoning behind it) has been discussed at length in the linked PR.

TL;DR
Not a bug, but intentional.
A workaround for HA users who prefer the previous implementation is also provided in the linked comment.

@dierochade
Copy link

@adidashi79
Did you succeed in adressing the issue?

I found that the code snippet provided to do the mapping in home assistant had an error, so I did update it. This should work now...

@gpayer
Copy link
Contributor

gpayer commented Jun 11, 2024

I have the same problem and I'm really not sure what to do now. Should I remove the entities from Z2M and readd them? Would they then show up correctly in HA?
The other solution seems to add an entry in configuration.yaml, did I understand this correctly?

@dierochade
Copy link

I have the same problem and I'm really not sure what to do now. Should I remove the entities from Z2M and readd them?

No

Would they then show up correctly in HA?

No

The other solution seems to add an entry in configuration.yaml, did I understand this correctly?

Unfortunately no.

The solution is to alter the way z2m presents the device to home assistant in auto discovery. As I had some problems to figure out the situation myself, a brief summary:

z2m publishes a for each TRV (and similar for any other device) a message under the topic homeassistant/climate/ieee_of_the_device/climate/config (example for my setup: homeassistant/climate/0x18fc26000003b5e4/climate/config).

This message is retained and allows home assistant to identify, read and control the device.

This message looks similar to this (put in any json formatter to make it readable):

{ "action_template": "{% set values = {None:None,'idle':'idle','heat':'heating','cool':'cooling','fan_only':'fan'} %}{{ values[value_json.running_state] }}", "action_topic": "zigbee2mqtt/Thermostat Bosch 5 Kinderzimmer", "availability": [ { "topic": "zigbee2mqtt/bridge/state", "value_template": "{{ value_json.state }}" }, { "topic": "zigbee2mqtt/Thermostat Bosch 5 Kinderzimmer/availability", "value_template": "{{ value_json.state }}" } ], "availability_mode": "all", "current_temperature_template": "{{ value_json.local_temperature }}", "current_temperature_topic": "zigbee2mqtt/Thermostat Bosch 5 Kinderzimmer", "device": { "identifiers": [ "zigbee2mqtt_0x18fc26000003b5e9" ], "manufacturer": "Bosch", "model": "Radiator thermostat II (BTH-RA)", "name": "Thermostat Bosch 5 Kinderzimmer", "sw_version": "3.05.09", "via_device": "zigbee2mqtt_bridge_0xe0798dfffe0f683d" }, "max_temp": "30", "min_temp": "5", "mode_command_topic": "zigbee2mqtt/Thermostat Bosch 5 Kinderzimmer/set", "mode_state_template": "{% set values = {'schedule':'auto','manual':'heat','pause':'off'} %}{% set value = value_json.operating_mode %}{{ values[value] if value in values.keys() else 'off' }}", "mode_state_topic": "zigbee2mqtt/Thermostat Bosch 5 Kinderzimmer", "modes": [ "off", "heat", "auto" ], "name": null, "object_id": "thermostat_bosch_5_kinderzimmer", "origin": { "name": "Zigbee2MQTT", "sw": "1.38.0", "url": "https://www.zigbee2mqtt.io" }, "temp_step": 0.5, "temperature_command_topic": "zigbee2mqtt/Thermostat Bosch 5 Kinderzimmer/set/occupied_heating_setpoint", "temperature_state_template": "{{ value_json.occupied_heating_setpoint }}", "temperature_state_topic": "zigbee2mqtt/Thermostat Bosch 5 Kinderzimmer", "temperature_unit": "C", "unique_id": "0x18fc26000003b5e9_climate_zigbee2mqtt", "mode_command_template": "{% set values = { 'auto':'schedule','heat':'manual','off':'pause'} %} \t{\"operating_mode\": \"{{ values[value] if value in values.keys() else 'pause' }}\"}" }
you must replace the following properties with these values (already done in the example):

modes: 
	["off", "heat", "auto"]
mode_state_template: 
	{% set values = {'schedule':'auto','manual':'heat','pause':'off'} %}
	{% set value = value_json.operating_mode %}
	{{ values[value] if value in values.keys() else 'off' }}
mode_command_topic: 
	zigbee2mqtt/<REPLACE with your friendly name>/set
mode_command_template: 
	{% set values = { 'auto':'schedule','heat':'manual','off':'pause'} %}
	{"operating_mode": "{{ values[value] if value in values.keys() else 'pause' }}"}

In essence this reroutes the command for the operation mode to the right attribute and maps the command values

This must be done every time, z2m sends the autodiscovery message (no other messages are published for these topics)
So, for instance, it must be done on every restart of z2m.

This can be done with an import of the premade template for node red (addon available) as linked here. This should work more or less out of the box, only replacement of ieee and friendly name is required. Maybe you need to restart z2m (if node red is not ready fast enough) on bootup .

It also can done with an automation by using the mqtt.publish service (see documentation). you can use a template to modify the payload or just catch the message for each device, make the changes manually, save it and publish it on an appropriate trigger (restart and new message in the topic should do it).
As I do almost all automations with node red, i cannot provide a blueprint for this.

Hope this helps.

@gpayer
Copy link
Contributor

gpayer commented Jun 12, 2024

@dierochade thank you!

I already pieced together a solution by reading your other comments in the linked threads. Or I might just go back to 1.37 ;-)

To whoever will take care of this regression, the necessary changes for the auto detection template are already there, they just have to integrated into homeassistant.js. Did I understand the code correctly that it might be enough to add the necessary changes into the legacyMapping array?

@burmistrzak
Copy link

To whoever will take care of this regression, the necessary changes for the auto detection template are already there, they just have to integrated into homeassistant.js. Did I understand the code correctly that it might be enough to add the necessary changes into the legacyMapping array?

Not that easy... Please see Koenkk/zigbee-herdsman-converters#7498 (comment) for context.

@Primevia
Copy link

I see all comments and issues relate to the Bosch thermostat which I also have. But I want to point out that the new released version of z2m has some more malfunctions. As example my entire power plugs and temp sensor randomly do not work. Multiple automation I have work randomly but I never had issues since over the last 3 years. Even sometimes when I open the z2m webui I do not see any devices inside. I am not a supporter of rollback but looking the result the new version has brought, it might be the best idea. Currently I have on hold the entire nodered climate on hold because it’s not working anymore. Likely it is summer and heaters are not needed till September I reflect on rollback to previous version.

@burmistrzak
Copy link

I see all comments and issues relate to the Bosch thermostat which I also have.

@Primevia Can you please be a bit more specific? What issues exactly are you having with the Bosch TRV? 🤔

But I want to point out that the new released version of z2m has some more malfunctions. As example my entire power plugs and temp sensor randomly do not work.

Which devices are unreliable?

Multiple automation I have work randomly but I never had issues since over the last 3 years. Even sometimes when I open the z2m webui I do not see any devices inside.

Seems unrelated and cannot confirm myself. Still, what's your setup (size, versions, OS, etc.) like?

I am not a supporter of rollback but looking the result the new version has brought, it might be the best idea. Currently I have on hold the entire nodered climate on hold because it’s not working anymore. Likely it is summer and heaters are not needed till September I reflect on rollback to previous version.

More details would be appreciated.

@Primevia
Copy link

I see all comments and issues relate to the Bosch thermostat which I also have.

@Primevia Can you please be a bit more specific? What issues exactly are you having with the Bosch TRV? 🤔
@burmistrzak , the issue is the one documented here, I only have left the heat function in HA and cannot power it off anymore. I have three of the Bosch thermostat ll. inside nodered I have setup a small climate function to power on power off or set different temperature based on different conditions and triggers. In nodered I can also not power off the TRV because the havc mode off is not supported anymore.

But I want to point out that the new released version of z2m has some more malfunctions. As example my entire power plugs and temp sensor randomly do not work.

Which devices are unreliable?
@burmistrzak , Nous A1Z. here I have some automation to power on power of at specific conditions and triggers. Even if all is met they remain on or off and there is no error message in HA. I only see the automation was correctly executed. Before 1.38.0.1 never had this issue.

Multiple automation I have work randomly but I never had issues since over the last 3 years. Even sometimes when I open the z2m webui I do not see any devices inside.

Seems unrelated and cannot confirm myself. Still, what's your setup (size, versions, OS, etc.) like?
@burmistrzak , hassio no docker, z2m and nodered app on same rpi. More than 60 services, 1200 entities , 25 z2m devices, 3 tasmota, 6 Zwave, 10 wifi, wallbox, solar System. Always updated to last version immediately as soon available. Last firmware on all devices and last version of all apps and integration.

I am not a supporter of rollback but looking the result the new version has brought, it might be the best idea. Currently I have on hold the entire nodered climate on hold because it’s not working anymore. Likely it is summer and heaters are not needed till September I reflect on rollback to previous version.

More details would be appreciated.
I hope I could deliver all information.

@burmistrzak
Copy link

the issue is the one documented here, I only have left the heat function in HA and cannot power it off anymore. I have three of the Bosch thermostat ll. inside nodered I have setup a small climate function to power on power off or set different temperature based on different conditions and triggers. In nodered I can also not power off the TRV because the havc mode off is not supported anymore.

I see. Unfortunately, the TRV does not support a system_mode other than heat, and system_mode is used by HA for HVAC mode.
However, I've added the Bosch-specific operating_mode (schedule | manual | pause) as a replacement. This still requires some manual configuration at the moment when used with HA, because operating_mode is not a standard climate feature. How to do this, you'll find in this thread.
A patch for the HA extension is planned, but a bit tricky to get right. We also need folks willing to throughly test any potential solution.

Nous A1Z. here I have some automation to power on power of at specific conditions and triggers. Even if all is met they remain on or off and there is no error message in HA. I only see the automation was correctly executed. Before 1.38.0.1 never had this issue.

Hmm, these rather low-cost Tuya devices aren't really my area of expertise. Sorry.
I suggest you enable debug logging where possible. There're many things (firmware, RF interference, MQTT, HA, etc.) that could go wrong here.

hassio no docker, z2m and nodered app on same rpi. More than 60 services, 1200 entities , 25 z2m devices, 3 tasmota, 6 Zwave, 10 wifi, wallbox, solar System. Always updated to last version immediately as soon available. Last firmware on all devices and last version of all apps and integration.

Here're all relevant changes to the Tuya converter, just FYI.

I hope I could deliver all information.

Sure did!

@gpayer
Copy link
Contributor

gpayer commented Jun 14, 2024

So I did some work on this.

I was able to create a unit test by adding the appropriate Bosch RBSH-TRV0-ZB-EU definition to the zigbeeHerdsman,js stub.

Initially without futher changes it produced the discovery payload that is currently actually produced, so that's good. I was able to adapt the code in homeassistant.js, quite crudely for testing purposes, so that a working discovery payload with appropriate templates was produced. And the payload check in my new unit test passes atm.

But from an architectural point of view more work should be invested to make this nice and extendable for future unknown use cases.

So my idea, I don't now if that is already possible, is that at the end of exposeToConfig for every discovery payload an extension hook is triggered, which might change the payload further. Like adding mappings for a device with poor protocol conformance.

I don't now what's possible with Z2M's extension system, but even if this case is not possible at the moment, it's probably not too complicated to add another possible hook.

This way both backwards compatibility can be managed and future highly specific use cases can be handled. And if I understood the Z2M frontend correctly such extension could also be added at runtime to a running system.

@burmistrzak what do you think?

@burmistrzak
Copy link

@gpayer Now, that's something we can work with!

Glad you've got the unit test working.

I get your idea, and it's not a bad one, but it really sounds like a lot of work for very little payoff.
This would essentially introduce an entirely new type of extension, only consumable by the HA extension.

We should probably focus on getting operating_mode supported first. 😅

@burmistrzak
Copy link

@gpayer I did a very quick draft for something that might restore the previous behavior in HA using auto-discovery.
This is just some untested code for homeassistant.ts right from the dome 🧠, no idea if it works or not.

If anyone wants to test it, feel free to do so, but don't use it in a PR yet!

            const mode = firstExpose.features.filter(isEnumExposeFeature).find((f) => f.name === 'system_mode');
            if (mode) {
                if (mode.values.includes('sleep')) {
                    // 'sleep' is not supported by Home Assistant, but is valid according to ZCL
                    // TRV that support sleep (e.g. Viessmann) will have it removed from here,
                    // this allows other expose consumers to still use it, e.g. the frontend.
                    mode.values.splice(mode.values.indexOf('sleep'), 1);
                }
                discoveryEntry.discovery_payload.mode_state_topic = true;
                discoveryEntry.discovery_payload.mode_state_template = `{{ value_json.${mode.property} }}`;
                discoveryEntry.discovery_payload.modes = mode.values;
                discoveryEntry.discovery_payload.mode_command_topic = true;
                // Workaround for Bosch RBSH-TRV0-ZB-EU
                const operatingMode = firstExpose.find((f) => f.name === 'operating_mode');
                if (operatingMode && mode.values.includes('heat') && mode.values.length === 1) {
                    discoveryEntry.discovery_payload.modes = ['off', 'heat', 'auto'];
                    discoveryEntry.discovery_payload.mode_state_template = `{% set values = ` +
                            `{'schedule':'auto','manual':'heat','pause':'off'} %}` + 
                            `{% set value = value_json.operating_mode %}` + 
                            `{{ values[value] if value in values.keys() else 'off' }}`;
                    discoveryEntry.discovery_payload.mode_command_template = `{% set values = ` +
                            `{'auto':'schedule','heat':'manual','off':'pause'} %}` + 
                            `{"operating_mode": "{{ values[value] if value in values.keys() else 'pause' }}"}`;
                }
            }

@gpayer
Copy link
Contributor

gpayer commented Jun 15, 2024

@burmistrzak thanks for your input, I solved it pretty similar. However there are some important changes:

  • operating_mode is not in firstExpose, I implemented it this way:
    const hasOperatingMode = definition && Array.isArray(definition.exposes) && definition.exposes.find((expose) => expose.name === 'operating_mode');
  • discoveryEntry.discovery_payload.mode_command_topic can't stay true, because then set/system_mode is used as topic suffix. I actually changed code later on to allow for non-boolean values of mode_command_topic.
  • But most importantly, if I understood this correctly, operating_mode is some custom Bosch invention. Its values are probably not standardized in any way as well. So there must be a check that this is a Bosch RBSH-TRV0-ZB-EU.

My suggestion, now without extension mechanics, would be to send all discovery payloads at the end of exposeToConfig together with device details etc. to a special function overridePayloadForNonConformingDevices or so. If the current device is one of the offending ones, then the custom payload values are set. Otherwise nothing is changed. This would be kind of similar to the legacyMapping definition, but more flexible.

I'll try to implement this tonight, just check my fork and branch for details: https://github.com/gpayer/zigbee2mqtt/tree/ha-ext-support-operating-mode

EDIT: It's done, although the override function is called from a better location.

@burmistrzak
Copy link

@gpayer Looks promising, very nice work! 🙌
I particularly like overridePayloadForNonConformingDevices, because it can be reused for other naughty devices, and is completely self contained.

This really seems to be an solid compromise.
We keep system_mode unmodified, and utilize the newly exposed custom attribute only for HA. While we can't easily switch between using operating_mode and system_mode, I can live with that. Especially the different meaning of auto (i.e. schedule) in HA makes this an overall compelling solution after all.

From what I can tell, operating_mode is standardized across all Bosch thermostats, supporting only three modes. But this can obviously change with any future update.

If you're comfortable with it, go ahead and open a PR. 🤝

@gpayer
Copy link
Contributor

gpayer commented Jun 16, 2024

@burmistrzak thanks for your code review and the support in the PR! 😀

Digging into this task was thankfully not too difficult, the code base is really good quality. I'm looking forward to being actually able to test this change, testing in production is sometimes necessary 😉

@burmistrzak
Copy link

@gpayer My pleasure! 😇
Really happy that we've finally found an amicable solution.

It's really frustrating that we have to do all these silly stunts, just to get these Bosch devices supported. Their products are relatively high-quality, but just non-compliant enough to break all sorts of things.
Such a shame... 😒

@adidashi79
Copy link
Author

@adidashi79 Did you succeed in adressing the issue?

I found that the code snippet provided to do the mapping in home assistant had an error, so I did update it. This should work now...

I am not that keen in all that programming and scripting. Made a solution in NodeRed to set off via setting 5 degree and save the old temperature to turn on with that. So its fine and I understand what's your point with Bosch not sticking to Zigbee.
Thank you for your great work, that even such a dummy as me can do great things with Zigbee2mqtt.

@burmistrzak
Copy link

burmistrzak commented Jun 16, 2024

@adidashi79 We already worked something out for HA users.
Once #23075 is merged, everything should just work, no manual configuration required. 😅

@Mar1usW3
Copy link

@adidashi79 We already worked something out for HA users.

Once #2307 is merged, everything should just work, no manual configuration required. 😅

i think you linked the wrong pr

@gpayer
Copy link
Contributor

gpayer commented Jun 17, 2024

@Mar1usW3 this is the correct PR: #23075

@burmistrzak
Copy link

@Mar1usW3 Woops, accidentally deleted the last digit. 🙈

@gpayer
Copy link
Contributor

gpayer commented Jul 8, 2024

The fix for this bug will come with release 1.39.1, however I don't know when it will be released.

That's why I created an addon to fix this problem locally in HA: https://github.com/gpayer/bosch-bth-ra-fixer

I'm running this on my live HA instance, it's so nice to finally have everything working again without manual intervention. Of course this addon will hopefully be obsolete soon. 😉

@tsloms
Copy link

tsloms commented Jul 12, 2024

After reading all this (and also other issues correlating with the Bosch Thermostat) I want to say thank you to everyone for contributing!
I'm no expert at all in terms of programming and I'm glad that there will be a fix sometime soon for me, as I'll just be waiting for 1.39.1 until I upgrade and will stay on 1.37. for the time being.

Copy link
Contributor

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days

@github-actions github-actions bot added the stale Stale issues label Dec 21, 2024
@gpayer
Copy link
Contributor

gpayer commented Dec 21, 2024

@adidashi79 This issue has been fixed since the version mentioned above was released. So you could close this issue if you want to.

Or has anyone else the necessary rights to do that?

@adidashi79
Copy link
Author

Thank you for that good work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working stale Stale issues
Projects
None yet
Development

No branches or pull requests

8 participants