adas4190
(Adas4190)
May 19, 2019, 10:25am
1
Hi. I’m fighting with this hardware to make in turn on and set effect automaticaly but I can’t figure it out. I have it work but I have to change effect manualy in a frontend. Could You please point me in a right direction or have example config as I’m novice in this matters.
Thank you.
glmnet
(Guillermo Ruffino)
May 19, 2019, 1:45pm
2
You’ll have to share what you did and what you expected it to do.
See other answers as examples
adas4190
(Adas4190)
May 19, 2019, 5:22pm
3
esphome:
name: kuchnia_led1
platform: ESP8266
board: nodemcuv2
wifi:
ssid: ""
password: ""
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
light:
- platform: fastled_clockless
chipset: WS2812B
pin: GPIO03
num_leds: 8
id: light_1
rgb_order: GRB
name: "FastLED Light"
effects:
- addressable_rainbow:
- addressable_rainbow:
name: bow
speed: 10
width: 50
- addressable_flicker:
- addressable_flicker:
name: Flicker Effect With Custom Values
update_interval: 16ms
intensity: 5%
adas4190
(Adas4190)
May 19, 2019, 5:23pm
4
what I couldn’t do is to make effect “rainbow” start when I turn on the light switch. Pls help.
Thank you
adas4190
(Adas4190)
May 19, 2019, 6:06pm
6
it works but not when I turn on the switch in front end I still have to choose effect from the list.
I made some change I have added:
api:
services:
- service: start_effect
variables:
my_effect: string
then:
- light.turn_on:
id: light_1
effect: !lambda 'return my_effect;'
So I can call this action from ha automation, but I wish It start automaticaly.
adas4190
(Adas4190)
May 19, 2019, 6:30pm
7
wow got it working by doing:
light:
- platform: fastled_clockless
chipset: WS2812B
pin: GPIO03
num_leds: 8
id: light_1
rgb_order: GRB
effects:
- addressable_rainbow:
switch:
- platform: template
name: "Kitchen Light Led"
optimistic: True
turn_on_action:
- light.turn_on:
id: light_1
effect: "Rainbow"
turn_off_action:
- light.turn_off:
id: light_1
Thak You guys, I hope it will help some one like me
glmnet
(Guillermo Ruffino)
May 19, 2019, 6:41pm
8
Great. Thanks for sharing. Takes a bit of time to nail it sometimes.
That switch you setup there is quite common. Whenever you want to activate something with a switch from ha that does not fit straightforward in esphome you resort to use that pattern.
you could also do this in your HA side service call. That way the NodeMCU isn’t interanlly limited to only turning on with that effect.
in your HA automation / script yaml
service: light.turn_on
data:
entity_id: light.fastled_light #(you might want to change this to kitchen or whatever)
effect: rainbow
adas4190
(Adas4190)
May 22, 2019, 6:39am
11
Ok. Thank you for sugestions. It works now