I made a simple fire alarm device with two analog sensors, one buzzer and 4pcs WS2811 led. Goal is when alarm goes on it activate buzzer and LED’s start to pulse in red color. That work ok
But when alarm goes off, buzzer is deactivated but LED’s are also off
Goal is that 2 LED’s light in green color (preferably at 30%).
Here is part of code:
sensor:
- platform: adc
pin: 3
id: flame
name: "flame_sensor"
attenuation: 11db
update_interval: 5s
on_value_range:
- below: 1.4
then:
- switch.turn_on: buzz
- light.turn_off: kitchen_alarm_light
- light.turn_on:
id: kitchen_alarm_light
brightness: 100%
red: 100%
green: 75%
blue: 0
effect: Fast Pulse
- above: 2.0
then:
- switch.turn_off: buzz
- light.turn_off: kitchen_alarm_light
- light.addressable_set:
id: kitchen_alarm_light
range_from: 0
range_to: 4
red: 0%
green: 0%
blue: 0%
- delay: 100ms
- light.addressable_set:
id: kitchen_alarm_light
range_from: 0
range_to: 2
red: 13.3%
green: 54.5%
blue: 13.3%