Osram Light on automation on humidity level -> color?

Hi,

I am completely new to hassio but I was able to set it up within couple of hours and I was able to create my automations that work!

I have a humidor for cigars and I want to use a color indication to see if humidity level is OK or not.

  1. humidity falls below 65% the trigger calls light on - works
  2. humidity above 65 the trigger calls light off - works

However, I cannot implement a color change to this automation. I want red light (or any other color) to indicate the wrong humidity.

This is the automation code:

  • action:
    • service: light.turn_on
      alias: test sensor top
      condition: []
      id: ‘1517091266990’
      data:
      brightness: 100
      rgb_color: [255, 0, 0]
      trigger:
    • below: ‘65’
      entity_id: sensor.humidity_158d0001fa52e7
      platform: numeric_state
  • action:
    • service: light.turn_off
      alias: test sensor top off
      condition: []
      id: ‘1517091303881’
      trigger:
    • above: ‘65’
      entity_id: sensor.humidity_158d0001fa52e7
      platform: numeric_state

Not sure what is wrong… can anyone support me?

Hi,
To get the code formatted correctly for the forum paste the code in
the edit box, leaving a blank line at the start and end, then select
the code and click the </> button in the small menu bar at the top of
the edit box.

Yaml is VERY picky about spaces and tabs :stuck_out_tongue: , tho’ given that the editor output it, it should be ok.

Presumably you have some sort of hub for this? The automation looks ok to me, tho’ trying to read anything the internal automations editor uses is hard to read :stuck_out_tongue:

The only thing I can see is that you have the turn_on service but I can’t see and entity_id for it to turn on :stuck_out_tongue: and the same with the turn_off.

Hi Keith,

i solved the issue today. Since everything is new for me I found the hint on youtube somehwere in some video.

I needed to add

{
“color_name”: “red”,
“entity_id”: “light.flexrgbw_01”
}

to the Call Service field, however, I was not able to insert RGB… but it works now :slight_smile: Thanks for your help!