Hi !
Sorry about my english.
I need help with Esphome lambda.I try expain ,what i want to do and what is my problem.Iinstalled rgb led strip to show DHW boiler temperature depending on sensor value.It works.But i want set the strip in pulse effect,if boiler is on and none effect,when boiler is off. Effect changes,if boiler switching,but stipe itself not pulsing.
- platform: gpio
name: boiler
id: relee_12
icon: mdi:water-boiler
restore_mode: RESTORE_DEFAULT_OFF
pin:
mcp23xxx: pcf8574h
number: 11
mode: OUTPUT
inverted: False
sensor:
- platform: dallas
address: 0x5C0117B2B6BDFF28
name: "boileritemp"
id: "boileritemp"
filters:
- calibrate_linear:
# Map 0.0 (from sensor) to 0.0 (true value)
- 0.0 -> 0.0
- 40.0 -> 55.0
on_value:
then:
- if:
condition:
lambda: 'return x < 35 && id(relee_12).state == true ;'
then:
- light.control:
id: boileriled
effect: none
brightness: 100%
red: 0%
green: 0%
blue: 100%
- if:
condition:
lambda: 'return x < 35 && id(relee_12).state == false ;'
then:
- light.control:
id: boileriled
effect: pulse1
- if:
condition:
lambda: 'return x > 35 and x < 37 && id(relee_12).state == false ;'
then:
- light.control:
id: boileriled
effect: pulse1
- if:
condition:
lambda: 'return x > 37 and x < 40 && id(relee_12).state == true ;'
then:
- light.control:
id: boileriled
brightness: 100%
effect: none
red: 40%
green: 0%
blue: 100%
- if:
condition:
lambda: 'return x > 37 and x < 40 && id(relee_12).state == false ;'
then:
- light.control:
id: boileriled
effect: pulse1
- if:
condition:
lambda: 'return x > 40 and x < 42 && id(relee_12).state == true ;'
then:
- light.control:
id: boileriled
brightness: 100%
effect: none
red: 61%
green: 19%
blue: 100%
- if:
condition:
lambda: 'return x > 40 and x < 42 && id(relee_12).state == false ;'
then:
- light.control:
id: boileriled
effect: pulse1
- if:
condition:
lambda: 'return x > 42 and x < 45 && id(relee_12).state == true ;'
then:
- light.control:
id: boileriled
brightness: 100%
effect: none
red: 67%
green: 0%
blue: 100%
- if:
condition:
lambda: 'return x > 42 and x < 45 && id(relee_12).state == false ;'
then:
- light.control:
id: boileriled
effect: pulse1
- if:
condition:
lambda: 'return x > 45 and x < 48 && id(relee_12).state == true ;'
then:
- light.control:
id: boileriled
brightness: 100%
effect: none
red: 100%
green: 0%
blue: 67%
- if:
condition:
lambda: 'return x > 45 and x < 48 && id(relee_12).state == false ;'
then:
- light.control:
id: boileriled
effect: pulse1
- if:
condition:
lambda: 'return x > 48 and x < 50 && id(relee_12).state == true ;'
then:
- light.control:
id: boileriled
brightness: 100%
effect: none
red: 100%
green: 0%
blue: 40%
- if:
condition:
lambda: 'return x > 48 and x < 50 && id(relee_12).state == false ;'
then:
- light.control:
id: boileriled
effect: pulse1
- if:
condition:
lambda: 'return x > 50 and x < 53 && id(relee_12).state == true ;'
then:
- light.control:
id: boileriled
brightness: 100%
effect: none
red: 93%
green: 17%
blue: 17%
- if:
condition:
lambda: 'return x > 50 and x < 53 && id(relee_12).state == false ;'
then:
- light.control:
id: boileriled
effect: pulse1
- if:
condition:
lambda: 'return x > 53 && id(relee_12).state == true ;'
then:
- light.control:
id: boileriled
brightness: 100%
effect: none
red: 100%
green: 0%
blue: 0%
- if:
condition:
lambda: 'return x > 53 && id(relee_12).state == false ;'
then:
- light.control:
id: boileriled
effect: pulse1
light:
- platform: rgb
name: "Boilerivalgus"
id: boileriled
red: output_component1
green: output_component2
blue: output_component3
effects:
- pulse:
- pulse:
name: "pulse1"
transition_length: 4s
update_interval: 5s
- pulse:
name: "pulse2"
transition_length: 6s
update_interval: 7s