How to use a neopixel led as notification

hi all,

i have one neopixel led mounted in my extractor hood in the kitchen,
i want it to be, red, green, blinking red, etc etc AND able to call up these state’s when various thing happen in the house (other nodes)
I came up with this workaround to get the state’s, but unable to give them an ID.
I thought giving the different state’s an ID then I would be able to make some services.
ans also I think it should be much easier to get a desired state, now I tweaked the “strobe” function…

light:
  - platform: neopixelbus
    type: GRB
    pin: GPIO3
    num_leds: 1
    name: "NeoPixel Light_afzuiger"
    effects:
      - strobe:
          name: "Red"
          colors:
            - state: True
              brightness: 100%
              red: 100%
              green: 0%
              blue: 0%
              duration: 9000ms
            - state: false
              duration: 0ms
      - strobe:
          name: "Red Strobe"
          colors:
            - state: True
              brightness: 100%
              red: 100%
              green: 0%
              blue: 0%
              duration: 200ms
            - state: false
              duration: 400ms
      - strobe:
          name: Yellow Strobe 
          colors:
            - state: True
              brightness: 100%
              red: 100%
              green: 50%
              blue: 0%
              duration: 200ms
            - state: False
              duration: 400ms
      - strobe:
          name: Yellow 
          colors:
            - state: True
              brightness: 100%
              red: 100%
              green: 50%
              blue: 0%
              duration: 9000ms
            - state: False
              duration: 0ms
      - strobe:
          name: Green Strobe 
          colors:
            - state: True
              brightness: 100%
              red: 0%
              green: 100%
              blue: 0%
              duration: 200ms
            - state: False
              duration: 400ms
      - strobe:
          name: Green 
          colors:
            - state: True
              brightness: 100%
              red: 0%
              green: 100%
              blue: 0%
              duration: 9000ms
            - state: False
              duration: 0ms
      - addressable_color_wipe:
          name: Green Pulse
          colors:
            - red: 0%
              green: 100%
              blue: 0%
              num_leds: 1
            - red: 0%
              green: 0%
              blue: 0%
              num_leds: 1
          add_led_interval: 1000ms
          reverse: False

  - platform: monochromatic
    name: "Kooklicht"
    id: kooklicht
    output: output_component1
    
output:
  - platform: esp8266_pwm
    id: output_component1
    pin: D5    

It would really help if you could put your template in preformatted text tags…

Why not just set the light color from inside Home Assistant with an automation?

Let’s say you want to the led to be red when it gets too cold then just have an automation trigger when the temp sensor goes below x and use the light.turn_on service with a color setting you like?

If you want to do it all inside the ESPHome sensor: You can do the same inside of ESPHome if the trigger is available inside your node. (you can use a native api sensor to get any Home Assistant sensor inside ESPHome).

hi thnx for your pointers.
the text tags still are in progress of figureing it out.
native api sensor is something to look into. thnx.
yes I have made some scene’s for the various neopixel leds I have in the house, and now I recall them when needed.