Flux_led present in states but not in devices

I just started with HA and am in the midst of trying to setup a Magic Pro LED that’s flux_led capable. I’ve got the LED up and running and it can be found in states.

But, I’m unable to add it in Integrations or Devices. Discovery is turned on in my configuration.

For my configuration.yaml, I have the following:

# Add LED Strip for server
light:
  - platform: flux_led
    automatic_add: true
    devices:
      10.0.1.55:
        name: LED Strip
#       protocol: 'ledenet'
        mode: rgb

Log is only showing this issue when I restart the server:
2020-03-09 22:26:46 WARNING (MainThread) [homeassistant.components.light] Setup of platform flux_led is taking over 10 seconds.

Thank you.

When you manually add things to yaml, you don’t (usually) need to further set them up in integrations. Things that are set up in yaml do not appear in devices.

If it is in your states it is working and you can control it.

What else are you trying to do?

Thank you for the quick response and clearing that up. I was playing with scripts and also hoping to do some programming with the led strip to have it show different colors based on conditions of the home.

I’m ready for those next steps but I’m unable to add the light to a script or not sure how to begin programming. I’ve got more work ahead of me studying the documentation.

I don’t understand why you think you need the integrations pages or device pages for that.

automation:
  alias: flux led test
  trigger:
    platform: time
    at: '00:09:00'
  action:
    service: light.turn_on
    data_template:
      entity_id: light.flux_led
      color_name: >
        {% if is_state('sensor.temperature', 'high') %} red
        {% else %} blue {% endif %}

I don’t and thus you’re right. I’m coming up to speed and thought I needed the light to appear in devices and then I could begin doing some programming with it. I’m good, and thank you for the code above as I can maybe start playing with it in my configuration.yaml.

Thank you again. I’ll close the thread.

1 Like

Hi, think I’m closing getting this code right thanks to your help. However, I’m getting an error thrown on this: Invalid config for [automation]: Invalid platform specified @ data[‘trigger’][0]. Got None.

Is the ping platform supported in automations or am I missing a piece of code? Thank you.

# Setup the LED light strip
light: 
  - platform: flux_led
    automatic_add: true
    devices:
      10.0.1.55:
        name: LED Strip
        mode: rgb

# Ping Google 
binary_sensor:
  - platform: ping
    host: 8.8.8.8
    scan_interval: 5

# LED light strip automation - check internet every 5 min and led is green if online, red if offline
automation:
  alias: check_internet_status_led
  trigger:
    platform: ping <event or state is needed here I believe>             
    host: 8.8.8.8
    scan_interval: 5
  action:
    service: light.turn_on
    data_template:
      entity_id: light.led_strip
      color_name: >
        {% if is_state('binary_sensor.ping_binary_sensor', 'on') %} green
        {% else %} red {% endif %}

Close, but not yet correct.

# Setup the LED light strip
light: 
  - platform: flux_led
    automatic_add: true
    devices:
      10.0.1.55:
        name: LED Strip
        mode: rgb

# Ping Google 
binary_sensor:
  - platform: ping
    host: 8.8.8.8
    scan_interval: 5
    name: binarysensorgoogle

# LED light strip automation - check internet every 5 min and led is green if online, red if offline
automation:
  alias: check_internet_status_led
  trigger:
  - platform: state
    entity_id: binary_sensor.binarysensorgoogle
#    to: 'on'
# or to: 'off'	depending what you want
  action:
    service: light.turn_on
    data_template:
      entity_id: light.led_strip
      color_name: >
        {% if is_state('binary_sensor.binarysensorgoogle', 'on') %} green
        {% else %} red {% endif %}

Edit: since you use a templete in the action, there is no need to specify to: in the trigger.

1 Like

Thank you very much. For my first project, this is really cool.

1 Like

I’m seeing that misconception happening a lot recently.

Either the documentation isn’t explaining it well enough or just simply the idea of the “device automation” in itself is confusing to new people. I think it’s the latter being exacerbated by the former.

1 Like

I never saw it in the documentation, however, I was at a point where I was able to add my flux_led light and see it under states.

I then started playing with scripts and I was unable to see the light as a device, which caused me to wonder how do I create a script (and then automation later) if the light can’t be added as a device and then selected in the script window.

Chalk it up to my newb status using HA for the first time. I guess you could indicate somewhere on the HA UI that some states/hardware (e.g., flux_led) will not show up as a device.

Thank you again.

1 Like

This should work on 2021.11 and later.