Thanks, funny enough I woke last night dreaming about using input selects for all these pixel effects. Will take some time to add the 40+ effects, but I think it’s the only way to go here in order to get some usage out of the effects… Combined with the script, it should work ok.
Regarding your comment about cycling through normal colors, I think that is the exact issue of this thread. If I pull up the color wheel in HA for this device and attempt to change colors - they don’t work properly. Perhaps I’m missing something in your comment, but this has been my experience. The only way I can get it so work, is after picking a color on the wheel (which most times doesn’t change the color on the strip), changing the brightness will then cause it to change the color. Something ain’t right there.
May be able to grab the list at least from the script to speed it up hopefully?
Yep, agreed on the normal colors. I can also click the same color a few times and it’ll take, but changing the brightness after picking the color is the quickest/most consistent way. It’s not ideal, but it’s an option at least.
I’m glad I wasn’t the only one that had this issue. I posted about this during the summer and got no response I contacted inovelli and they did some troubleshooting but once I said I used a script to fix my issue I never got a final answer as to why this was occuring.
Where it was most profound was attempting to turn the lights on to anything other than white I figured out using a delay of a second or 2 then sending the command again would adjust it properly. For example if I wanted 45% brightness it would go to maybe 10% then a second or 2 later actually go to 45% because of the script even though at the 10% the controller on the strip said 45% it was certainly not 45%. I don’t even touch the color wheel. I just use scripts.
I believe that Home Assistant is sending a Multi Level Set command immediately after sending the Color Switch command and that is stopping the color change from talking place. Is it possible to either 1. Make HA stop sending the Set Level? Or 2. Specify the duration of the Color Switch to be 0?
@nathanfiscus has created a Blueprint that solves the problem with color, but it creates the problem on the color temperature. So we are close to finding a workaround.
Edit: It has been updated and should be working now. Just need to:
Import the blueprint from the above URL:
Configuration > Blueprint > Import
After the import, create an automation (should be an option during the import process):
This is great timing! I just installed my strip over the weekend and was disappointed to experience the same behavior as the others. I just added the blueprint and the color wheel works now! I am able to bounce around the wheel and go back and forth between the wheel and temperature bar without (much) issue. There was one point where I probably went too fast and it took several seconds for the strip to catch up. But it did! Haven’t tried mixing color commands with pixel effects, but that seems low risk.
Edit: went to show my wife and wouldn’t you know it, it lagged right away, but caught up when I started messing with the brightness. Still happy overall though
While I’m here, anyone discovered a way to make pixel effects more functional in Lovelace? Like the users above, making dozens of buttons would be tedious.
I think using input selects would be the way to go if you need it in Lovelace as it’ll end up as one dropdown for you to choose the specific effect from your dashboard (instructions up the thread on how to do that). Otherwise I’d just use Node-Red as seen here.
Absolutely, and if you’re not already using Node-Red with HA, it’s a lot simpler for more complicated or involved automations imo. Lots of videos and documentation on it, along with it being very visually-oriented.
Hi - looks like that Blueprint works about 60% (up from 0%!) of the time to fix the color change issue (at least on my end) - but it looks like if you add a delay of 1 second before the light.turn_on action, it works 100% of the time.
Here’s a link to my edited Blueprint YAML: BetterPaste
I was having trouble with changing colors as well. I tried the blueprint; it helped but didn’t fully solve the problem. While troubleshooting I discovered exactly what you mentioned, that the Multi Level Set command was being sent immediately after a Color Switch Command was issued. I resolved it slightly differently by creating a template light. Works well and best of all, supports color change transitions!
light:
- platform: template
lights:
boys_room_matthew_light_frontend:
friendly_name: "Matthew's LED Strip"
level_template: "{{ state_attr('light.boys_room_matthew_light', 'brightness')|int }}"
value_template: "{{ state_attr('light.boys_room_matthew_light', 'brightness')|int > 0 }}"
temperature_template: "{{ state_attr('light.boys_room_matthew_light', 'color_temp') | int}}"
color_template: "{{ state_attr('light.boys_room_matthew_light', 'hs_color') }}"
turn_on:
service: zwave_js.set_value
data:
command_class: "38"
endpoint: "0"
property: targetValue
value: "255"
options:
transitionDuration: >
{%- set tran_time = (transition | default(1)) %}
{{ [tran_time | int,'s'] | join }}
target:
entity_id: light.boys_room_matthew_light
turn_off:
service: zwave_js.set_value
data:
command_class: "38"
endpoint: "0"
property: targetValue
value: "0"
options:
transitionDuration: >
{%- set tran_time = (transition | default(1)) %}
{{ [tran_time | int,'s'] | join }}
target:
entity_id: light.boys_room_matthew_light
set_level:
service: zwave_js.set_value
data:
command_class: "38"
endpoint: "0"
property: targetValue
value: "{{ (( brightness / 255) * 99 ) | int }}"
options:
transitionDuration: >
{%- set tran_time = (transition | default(1)) %}
{{ [tran_time | int,'s'] | join }}
target:
entity_id: light.boys_room_matthew_light
set_temperature:
- service: zwave_js.set_value
data:
command_class: "51"
endpoint: "0"
property: targetColor
value:
warmWhite: "{{ ( color_temp - 153) / (370 - 153) * 255 }}"
coldWhite: "{{ ( 1 - (( color_temp - 153) / (370 - 153))) * 255 }}"
red: 0
green: 0
blue: 0
options:
transitionDuration: >
{%- set tran_time = (transition | default(1)) %}
{{ [tran_time | int,'s'] | join }}
target:
entity_id: light.boys_room_matthew_light
- service: zwave_js.refresh_value
data:
entity_id: light.boys_room_matthew_light
set_color:
- service: zwave_js.set_value
data:
command_class: "51"
endpoint: "0"
property: targetColor
value:
warmWhite: 0
coldWhite: 0
red: >
{%- set h1 = h / 360 | float %}
{%- set s1 = s / 100 | float %}
{%- set v = 1 | float %}
{%- set i = (h1 * 6)|int %}
{%- set f = h1 * 6 - i %}
{%- set p = v * (1 - s1) %}
{%- set q = v * (1 - f * s1) %}
{%- set t = v * (1 - (1 - f) * s1) %}
{%- if i % 6 == 0 %}
{% set r = v %}
{% set g = t %}
{% set b = p %}
{%- elif i % 6 == 1 %}
{% set r = q %}
{% set g = v %}
{% set b = p %}
{%- elif i % 6 == 2 %}
{% set r = p %}
{% set g = v %}
{% set b = t %}
{%- elif i % 6 == 3 %}
{% set r = p %}
{% set g = q %}
{% set b = v %}
{%- elif i % 6 == 4 %}
{% set r = t %}
{% set g = p %}
{% set b = v %}
{%- elif i % 6 == 5 %}
{% set r = v %}
{% set g = p %}
{% set b = q %}
{%- endif %}
{{ (255*r)|round(0) }}
green: >
{%- set h1 = h / 360 | float %}
{%- set s1 = s / 100 | float %}
{%- set v = 1 | float %}
{%- set i = (h1 * 6)|int %}
{%- set f = h1 * 6 - i %}
{%- set p = v * (1 - s1) %}
{%- set q = v * (1 - f * s1) %}
{%- set t = v * (1 - (1 - f) * s1) %}
{%- if i % 6 == 0 %}
{% set r = v %}
{% set g = t %}
{% set b = p %}
{%- elif i % 6 == 1 %}
{% set r = q %}
{% set g = v %}
{% set b = p %}
{%- elif i % 6 == 2 %}
{% set r = p %}
{% set g = v %}
{% set b = t %}
{%- elif i % 6 == 3 %}
{% set r = p %}
{% set g = q %}
{% set b = v %}
{%- elif i % 6 == 4 %}
{% set r = t %}
{% set g = p %}
{% set b = v %}
{%- elif i % 6 == 5 %}
{% set r = v %}
{% set g = p %}
{% set b = q %}
{%- endif %}
{{ (255*g)|round(0) }}
blue: >
{%- set h1 = h / 360 | float %}
{%- set s1 = s / 100 | float %}
{%- set v = 1 | float %}
{%- set i = (h1 * 6)|int %}
{%- set f = h1 * 6 - i %}
{%- set p = v * (1 - s1) %}
{%- set q = v * (1 - f * s1) %}
{%- set t = v * (1 - (1 - f) * s1) %}
{%- if i % 6 == 0 %}
{% set r = v %}
{% set g = t %}
{% set b = p %}
{%- elif i % 6 == 1 %}
{% set r = q %}
{% set g = v %}
{% set b = p %}
{%- elif i % 6 == 2 %}
{% set r = p %}
{% set g = v %}
{% set b = t %}
{%- elif i % 6 == 3 %}
{% set r = p %}
{% set g = q %}
{% set b = v %}
{%- elif i % 6 == 4 %}
{% set r = t %}
{% set g = p %}
{% set b = v %}
{%- elif i % 6 == 5 %}
{% set r = v %}
{% set g = p %}
{% set b = q %}
{%- endif %}
{{ (255*b)|round(0) }}
options:
transitionDuration: >
{%- set tran_time = (transition | default(1)) %}
{{ [tran_time | int,'s'] | join }}
target:
entity_id: light.boys_room_matthew_light
- service: zwave_js.refresh_value
data:
entity_id: light.boys_room_matthew_light
supports_transition_template: "{{ true }}"
min_mireds_template: "{{ state_attr('light.boys_room_matthew_light', 'min_mireds') | int}}"
max_mireds_template: "{{ state_attr('light.boys_room_matthew_light', 'max_mireds') | int}}"
availability_template: "{{ states('light.boys_room_matthew_light') != 'unavailable' }}"