kireque / esphome_nebula_light

55 stars 2 forks source link

Not an issue but a request #4

Closed MrRodz closed 2 years ago

MrRodz commented 2 years ago

Fantastic work the guide was really useful. Is it possible to add a switch in HA to disable the blue led on the side of the case. Think it’s GPIO 0

Thank you

kireque commented 2 years ago

Thanks for the compliment.

You can change this section:

- platform: monochromatic
    name: ${name}_bled
    id: bled
    output: bled_pwm
    restore_mode: ALWAYS_OFF
    internal: true
  - platform: monochromatic
    name: ${name}_rled
    id: rled
    output: rled_pwm
    restore_mode: ALWAYS_OFF
    internal: true

Remove internal: true also remove the bottom section:

interval:
  - interval: 1s
    then:
      if:
        condition:
          wifi.connected:
        then:
          - light.turn_on: 
              id: bled
              brightness: 50%
        else:
          - light.turn_off: 
              id: bled
  - interval: 1s
    then:
      if:
        condition:
          api.connected:
        then:
          - light.turn_on: 
              id: rled
              brightness: 50%
        else:
          - light.turn_off: 
              id: rled

That should do the trick and you will be able to manually control leds on the side of the case

MrRodz commented 2 years ago

Thank you, worked perfectly :)