Changing color in Aeotec LED globe

I have the following globe in my Home Assistant set up

http://aeotec.com/z-wave-led-lightbulb

it appears correctly in my set up and I can manually turn it on and with the box that appears, I can change its color and brightness / temperature.

I am trying to set up a automation which will turn on the globe at full brightness and white color during the day, and a dull red at night when a motion detector is trigger.

I have the automation set up, and can get the motion detector to turn on the LED. However when I try to add either color information or brightness to the globe as a scene, the scene wont activate

So I have this scene that works

- name: Lamp_on
  entities:
    light.aeotec_zw098_led_bulb_level_8_0:
      state: on

but if I add brightness or color_rgb values under state the scene breaks

- name: Lamp_red
  entities:
    light.aeotec_zw098_led_bulb_level_8_0:
      state: on
      rgb_color: (111,0,1)
      brightness: 255

I am getting the following error message

10:06:08 homeassistant.core: Invalid service data for light.turn_on: None for dictionary value @ data[‘rgb_color’]. Got ‘(111,0,1)’

The rgb_color value is what is listed in the states tab in the developer tools.

Any suggestions on how to get this automation / scene working?

Why not just put it straight into the automation with a data template?

Partly because I am a Home Assistant noob, and am blatantly copying other peoples configurations. Most of the examples listed in the cookbook use their automation to trigger either scenes or scripts.

I have my automation triggering a script, so that the script can trigger a second script to turn the light off after 10 minutes.

When you say to put it straight in the automation with a data template do you mean something like

- alias: "Sensor Light"
  trigger:
    platform: state
    entity_id: binary_sensor.aeotec_zw100_multisensor_6_sensor_7_0
    to: 'on'
  action:
    service: homeassistant.turn_on
    data:
      entity_id: light.aeotec_zw098_led_bulb_level_8_0
      brightness: 255
      rgb_color: (111,0,1)

Sorry as this is a bit off topic, but how are you finding the Aeotec LED globe? I’ve purchased 13 LIFX lights lately and I totally DESPISE them due to their INCREDIBLE unreliability.

I even dropped a lot of money on a UniFi AC Pro wfi access point in the hopes that it would help but it’s clear that the firmware/hardware in the LIFX bulbs is the problem and not the wifi.

I am now considering buying a bunch of Aeotec z-wave lights in the hopes that they will actually function as intended and would love to hear your opinion of them.

I think the entity id goes in the action section, rather than the data section, like this:

  • alias: “Sensor Light”
    trigger:
    platform: state
    entity_id: binary_sensor.aeotec_zw100_multisensor_6_sensor_7_0
    to: ‘on’
    action:
    service: homeassistant.turn_on
    entity_id: light.aeotec_zw098_led_bulb_level_8_0
    data:
    brightness: 255
    rgb_color: (111,0,1)

Thanks for the suggestion

I has swapped it around so that the entity_id is above data, with the brightness and rgb_color nested under data

- alias: "Sensor Light"
  trigger:
    platform: state
    entity_id: binary_sensor.aeotec_zw100_multisensor_6_sensor_7_0
    to: 'on'
  action:
    service: homeassistant.turn_on
    entity_id: light.aeotec_zw098_led_bulb_level_8_0
    data:
      brightness: 255
      rgb_color: (111,0,1)

and get the following error message still

16-11-23 19:46:00 homeassistant.core: Invalid service data for light.turn_on: None for dictionary value @ data[‘rgb_color’]. Got ‘(111,0,1)’

When the brightness / rgb_color isn’t nested like

- alias: "Sensor Light"
  trigger:
    platform: state
    entity_id: binary_sensor.aeotec_zw100_multisensor_6_sensor_7_0
    to: 'on'
  action:
    service: homeassistant.turn_on
    entity_id: light.aeotec_zw098_led_bulb_level_8_0
    data:
    brightness: 255
    rgb_color: (111,0,1)

I get the following

16-11-23 19:47:10 homeassistant.bootstrap: Invalid config for [automation]: expected dict for dictionary value @ data[‘action’][0][‘data’]. Got None
extra keys not allowed @ data[‘action’][0][‘brightness’]. Got None
extra keys not allowed @ data[‘action’][0][‘rgb_color’]. Got None. (See /home/hass/.homeassistant/details/automation.yaml:3). Please check the docs at https://home-assistant.io/components/automation/

I would really love to recommend these globes as they otherwise work really well, but not being able to change their color via a script / scene / automation is really limiting their utility

It seems that I am officially an idiot

After changing the line from

rgb_color: (111,0,1)

to

rgb_color: [111,0,1]

it now works beautifully.