zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

TZ3210_onejz0gt / TS0504B - cannon change color via HA

Open fabiobaldoibs opened this issue 3 years ago • 14 comments

What happened?

After the update to version 1.30.0-x, I cannot change the rgb color on HA. I can change the color by using the exposes feature inside the ZigBee2MQTT module. I returned the backup to 1.29.2-1 and now it is working.

What did you expect to happen?

Change the color

How to reproduce it (minimal and precise)

Inside the lovelace, find the device and click the menu to open the color settings. Click to change de color - nothing happened.

Zigbee2MQTT version

1.29.2-1

Adapter firmware version

20220219

Adapter

sonoff zibnee 3.0

Debug log

No response

fabiobaldoibs avatar Feb 18 '23 23:02 fabiobaldoibs

Same Issue over here, didn't test the older version of Z2M. I have the Slaesh's CC2652RB stick.

marciej123 avatar Feb 23 '23 14:02 marciej123

Same issue here as well. Older Version not tested. My Coordinator is Phoscon ConBee II.

paulbrause avatar Feb 23 '23 14:02 paulbrause

Same for me. In debug mode I noticed one difference: send from Z2M -> Expose (it's ok) Received MQTT message on 'zigbee2mqtt/entity_name/set' with data '{"color":{"hex":"#86007D"}}' send from Lovelace (not ok) Received MQTT message on 'zigbee2mqtt/entity_name/set' with data '{"state":"ON","color":{"h":360.0,"s":85.71428571428571}}'

UPDATE: In my case it was because of color_mode: I had to set on: "color_mode": "hs", Now it works perfectly fine. But if I change color in Z2m -> Expose interface -> color_mode is changing on "xy" and my Lovelace cards cant change color. That what it's happening in my case. Most important that I know what to do to fix this.

LeszekBi avatar Mar 02 '23 21:03 LeszekBi

@LeszekBi Where can I find the "color_mode" configuration? or is a yaml configuration?

fabiobaldoibs avatar Mar 05 '23 14:03 fabiobaldoibs

@fabiobaldoibs I can see it in z2m -> MyDevice -> Status -> "color_mode": "hs". For now I don't know how to change color_mode by config but I noticed that it's changing when I use z2m interface to change color and the same on lovelace on different cards. (card decide which color_mode to use and change it).

LeszekBi avatar Mar 05 '23 20:03 LeszekBi

Z2M -> MyDevice -> Status shows me this:

{
    "brightness": 254,
    "color": {
        "h": 210,
        "hue": 210,
        "s": 85.71428571428571,
        "saturation": 85.71428571428571,
        "x": 0.1873,
        "y": 0.2552
    },
    "color_mode": "hs",
    "linkquality": 252,
    "state": "ON"
}

When i change the color via Z2M (works fine, no matter if i change color_hs or color_xy):

2023-03-14 18:32:45 Received MQTT message on 'zigbee2mqtt/LEDStreifen_Bett_Schlafzimmer/set' with data '{"color":{"hex":"#0000F9"}}'
2023-03-14 18:32:45 Skipping state because of Home Assistant
2023-03-14 18:32:45 Publishing 'set' 'color' to 'LEDStreifen_Bett_Schlafzimmer'
2023-03-14 18:32:45 Missing colorTempPhysicalMin and/or colorTempPhysicalMax for endpoint 0xa4c138d4881f34f7!

When i try to change the color via HA Lovelace (didn't work, only on/off and brightness):

2023-03-14 18:35:01 Received MQTT message on 'zigbee2mqtt/LEDStreifen_Bett_Schlafzimmer/set' with data '{"state":"ON","color":{"h":120.0,"s":85.71428571428571}}'
2023-03-14 18:35:01 Skipping state because of Home Assistant
2023-03-14 18:35:01 Publishing 'set' 'color' to 'LEDStreifen_Bett_Schlafzimmer'
2023-03-14 18:35:01 Missing colorTempPhysicalMin and/or colorTempPhysicalMax for endpoint 0xa4c138d4881f34f7!

Where is the problem now? Z2M or Lovelace?

And any idea how to fix this?

paulbrause avatar Mar 14 '23 17:03 paulbrause

I think Lovelace use color_mode from entity attribute. You can try to switch between modes by calling service: Developer tools -> Services -> light.turn_on There you have nice GUI to set proper options.

LeszekBi avatar Mar 14 '23 20:03 LeszekBi

I tried to switch to another color mode, but without success:

Via Z2M (working):

2023-03-15 00:53:34 MQTT publish: topic 'zigbee2mqtt/LEDStreifen_Bett_Schlafzimmer', payload '{"brightness":251,"color":{"h":240,"hue":240,"s":100,"saturation":100,"x":0.1355,"y":0.0399},"color_mode":"xy","linkquality":255,"state":"ON"}'

Via Developer tools -> Services (not working):

2023-03-15 00:55:34 MQTT publish: topic 'zigbee2mqtt/LEDStreifen_Bett_Schlafzimmer', payload '{"brightness":251,"color":{"h":39.6,"hue":39.6,"s":78.431,"saturation":78.431,"x":0.4362,"y":0.4211},"color_mode":"hs","linkquality":255,"state":"ON"}'

So it is still using "color_mode: hs" instead of "color_mode: xy".

This was my yaml-code in Developer Tools -> Services:

service: light.turn_on
data:
  xy_color:
    - 0.52
    - 0.43
target:
  entity_id: light.ledstreifen_bett_schlafzimmer

paulbrause avatar Mar 14 '23 23:03 paulbrause

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

github-actions[bot] avatar Apr 15 '23 00:04 github-actions[bot]

Did anyone try to update to the latest version?

fabiobaldoibs avatar Apr 18 '23 23:04 fabiobaldoibs

Did anyone try to update to the latest version?

fabiobaldoibs avatar Apr 18 '23 23:04 fabiobaldoibs

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

github-actions[bot] avatar May 19 '23 00:05 github-actions[bot]

Something new here? Very frustrating. I go from ZHA to Z2M and discovered this problem now :(

LasseTheDude avatar Dec 11 '23 21:12 LasseTheDude

Same issue with homebridge-z2m, which uses hs colorMode, which doesn't work (everything is fine via z2m itself, which uses xy)

adriweb avatar Mar 22 '24 01:03 adriweb