Is it possible to do a progress bar with WLED? Like plan a light strip under my kitchen, and under the dishwasher I want to do it for example red when running, green when done. SO I know that can be done with segments on an addressable light strip. But is it possible instead doing the part solid red when running making it like a progress bar, So it gets more green lights until it is complete and solid green.
Select the colors you want and give the Percent effect a go. Then use the intensity slider to change the progress.
how to do thisssss? câmon
Set the effect to âpercentâ.
Set the intensity to the percent you want lit (0 to 100%).
e.g.
EDIT: removed. This automation used an incorrect service call. See here for the correct version: Is it possible to do a progress bar with WLED? - #17 by tom_l
If you have particular colours in mind you could save the colours and effect as a preset in the WLED device and set that too:
https://www.home-assistant.io/integrations/wled/#activating-a-preset
mesmerizingâŚ
thank you, mr. tom_l !!
My sensor is not in a percentage. It is a sensor for distance. I would like my âloading barâ to grow as the device gets closer. If I follow your config then it will grow equal to the distance. How do I reverse it?
value: "{{ ( 100 - 100 * states('sensor.some_255_max_sensor')|float(0) / 255 )|round(0)|int(0) }}"
Thank you!
Have been trying to do this, however my WLED setup just doesnât seem to change!
alias: Dragon LED - Battery
description: ""
trigger:
- platform: state
entity_id:
- sensor.battery_percent_2
condition: []
action:
- service: select.select_option
data:
option: "{{ states('sensor.battery_percent_2') }}"
target:
entity_id: number.wled_dragon_segment_1_intensity
mode: single
Tested:
- Automation triggers correctly on battery state change
- Manually running the automation doesnât work
- Have checked and battery value is coming through as a simple number (ie no % symbol or anything)
- manually changing the â% of fillâ value in WLED works perfectly
Can I check is âintensityâ the right entity to target in HA to update the â% of fillâ value?
In the logs I get:
2023-04-05 21:55:59.360 INFO (MainThread) [homeassistant.components.automation.dragon_led_battery] Dragon LED - Battery: Running automation actions
2023-04-05 21:55:59.360 INFO (MainThread) [homeassistant.components.automation.dragon_led_battery] Dragon LED - Battery: Executing step call service
2023-04-05 21:55:59.364 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities number.wled_dragon_segment_1_intensity or it is/they are currently not available
Hi!
Is anyone able to make this work?
Service is working OK but when the sensor value is 25 (i.e. 25%), I get no light at all.
When value is 50, I get 25% of the light.
When value is 75, I get 66% of the light.
When value is 100, I get 100% of the light.
Thatâs weird, isnât it?!?!
My WLED version is v0.14.0-b1 âHoshiâ and in the Home Assistant Automation I am using service ânumber.set_valueâ.
Thanks!
May be try without the service but via the HTTP Request API - WLED Project or JSON API - WLED Project or over mqtt
will try. thanks!
Did you ever find a solution for this? [quote=âjjvelar, post:10, topic:436929, full:trueâ]
Hi!
Is anyone able to make this work?
Service is working OK but when the sensor value is 25 (i.e. 25%), I get no light at all.
When value is 50, I get 25% of the light.
When value is 75, I get 66% of the light.
When value is 100, I get 100% of the light.
Thatâs weird, isnât it?!?!
My WLED version is v0.14.0-b1 âHoshiâ and in the Home Assistant Automation I am using service ânumber.set_valueâ.
Thanks!
[/quote]
Do you have the correct number of LEDs set in your string?
Thanks for replying.
Yes, I do.
Any other thoughts?
Try asking on the WLED discord channel.
Make sure you are using * Color 1 colour pallet (any Fx colour selected) with the Bg set to black.
And change your automation to this:
alias: Dragon LED - Battery
description: ""
trigger:
- platform: state
entity_id:
- sensor.battery_percent_2
not_to:
- unknown
- unavailable
condition:
- condition: template
value_template: "{{ 0 <= states('sensor.battery_percent_2')|int <= 100 }}"
action:
- service: number.set_value
data:
value: "{{ states('sensor.battery_percent_2')|int }}"
target:
entity_id: number.wled_dragon_segment_1_intensity
mode: single
You can not go over 100% or the display does odd things so I put in a condition. Also the original automation I wrote used the wrong service.
Hey everyone!
If youâre still exploring ways to implement a progress bar with WLED â I wanted to share another approach that gives you full control without relying on number.set_value
or fighting with effect quirks.
I built an integration called WLED Live View Proxy that lets you send raw JSON API commands to WLED via WebSocket â so you can control exactly how the strip looks, including the percent effect, color, background, palette, and brightness â all in one go, directly from automations.
Hereâs an example using dynamic intensity from a sensor (battery level in this case â you can use any percentage-like sensor):
action: wled_liveviewproxy.send_command
data:
targets:
entity_id: light.wled_strip
command: {on: true, seg: [{id: 0, fx: 98, pal: 0, col: ["00ff00", "000000"], bri: 255, ix: "{{ states('sensor.bathroom_door_1_battery') | int(0) }}"}]}
This sets:
- Foreground color to green, background to black
- Brightness to 100%
- Progress fill based on the value of
sensor.bathroom_door_1_battery
(example)
No YAML escaping, no REST tricks â just direct control.
More info and setup here:
WLED Live View Proxy for Home Assistant
An update to thisâŚ0-100 puts the bar 0-100 from the left to right. 100-200 puts the bar from right to left. Above 200 does nothing.
Itâs good to have choice but installing a 3rd party integration and setting up a complicated command seems a lot more hassle to me than just using the controls already exposed by WLED (the number entity for value and select entity for effect).
Also nowhere was this needed: