ESP LAMP MQTT - integracja z AIS

Jako, że nie udało mi się zintegrować projektu https://diyhue.org/ z asystentem, poszukałem dalej i znalazłem coś skrojonego na miarę czyli
https://github.com/Dullage/ESP-LED-MQTT

Sama lampka śmiga i widzę ją w drzewku homeassistant w brokerze mqtt asystenta (przez mqtt explorer), w README są jakieś przykłady konfigów HA ale nie wiem dokładnie to wstawić albo dodać przez UI asystenta. Wiecie jak to zintegrować ?

Home Assistant Examples

light: Basic control of a light.

- platform: mqtt
  name: Lamp
  state_topic: "light/lamp/state"
  command_topic: "light/lamp"
  rgb_state_topic: "light/lamp/rgb/state"
  rgb_command_topic: "light/lamp/rgb"
  availability_topic: "light/lamp/availability"
  payload_not_available: "0"
  payload_available: "1"
  payload_off: "0"
  payload_on: "1"
  retain: false

Note: The recovery topic does not need to be used in the Home Assistant config.

input_select: UI to allow user to trigger an animation.

lamp:
    name: Lamp
    options:
      - "Select..."
      - "Warm Light"
      - "Strobe"
      - "Fire"
      - "Colour Phase"
      - "Sparkle"
      - "Shoot / Drip"
      - "Rain"
      - "Rainbow 1"
      - "Rainbow 2"
    initial: "Select..."

automation: Sends the appropriate MQTT command when a mode is selected and then returns the input select back to ‘Select…’

- alias: "Lamp Mode"
  trigger:
    platform: state
    entity_id: input_select.lamp       
  action:
    - service: mqtt.publish
      data_template:
        topic: "switch/stairs"
        payload: >
          {% if trigger.to_state.state == 'Warm Light' %}
            {0:2,2:[255,147,41]}
          {% elif trigger.to_state.state == 'Strobe' %}
            {0:3}
          {% elif trigger.to_state.state == 'Fire' %}
            {0:4}
          {% elif trigger.to_state.state == 'Colour Phase' %}
            {0:5,3:15}
          {% elif trigger.to_state.state == 'Sparkle' %}
            {0:6,2:[50,50,50],3:0,4:5,5:0}
          {% elif trigger.to_state.state == 'Shoot / Drip' %}
            {0:7,2:[255,147,41],8:0,10:1,9:30, 5:0 ,4:255,3:0,12:5,7:0}
          {% elif trigger.to_state.state == 'Rain' %}
            {0:8,11:1100}
          {% elif trigger.to_state.state == 'Rainbow 1' %}
            {0:12}
          {% elif trigger.to_state.state == 'Rainbow 2' %}
            {0:13}
          {% else %}
            {}
          {% endif %}
        retain: false
    - service: input_select.select_option
      data:
        entity_id: input_select.stairlamp_mode
        option: 'Select...'

dodałem te konfiguracje do configuration.yml w ten sposób:

light:

  • platform: mqtt
    name: Jowisz
    state_topic: “homeassistant/light/jowisz/state”
    command_topic: “homeassistant/light/jowisz”
    rgb_state_topic: “homeassistant/light/jowisz/rgb/state”
    rgb_command_topic: “homeassistant/light/jowisz/rgb”
    availability_topic: “homeassistant/light/jowisz/availability”
    payload_not_available: “0”
    payload_available: “1”
    payload_off: “0”
    payload_on: “1”
    retain: false
  • platform: mqtt
    name: Moon
    state_topic: “homeassistant/light/moon/state”
    command_topic: “homeassistant/light/moon”
    rgb_state_topic: “homeassistant/light/moon/rgb/state”
    rgb_command_topic: “homeassistant/light/moon/rgb”
    availability_topic: “homeassistant/light/moon/availability”
    payload_not_available: “0”
    payload_available: “1”
    payload_off: “0”
    payload_on: “1”
    retain: false

input_select:
light:
name: Jowisz
options:
- “Select…”
- “Warm Light”
- “Strobe”
- “Fire”
- “Colour Phase”
- “Sparkle”
- “Shoot / Drip”
- “Rain”
- “Rainbow 1”
- “Rainbow 2”
initial: “Select…”

automations.yml

  • alias: “Jowisz Mode”
    trigger:
    platform: state
    entity_id: input_select.jowisz
    action:
    • service: mqtt.publish
      data_template:
      topic: “switch/jowisz_sw”
      payload: >
      {% if trigger.to_state.state == ‘Warm Light’ %}
      {0:2,2:[255,147,41]}
      {% elif trigger.to_state.state == ‘Strobe’ %}
      {0:3}
      {% elif trigger.to_state.state == ‘Fire’ %}
      {0:4}
      {% elif trigger.to_state.state == ‘Colour Phase’ %}
      {0:5,3:15}
      {% elif trigger.to_state.state == ‘Sparkle’ %}
      {0:6,2:[50,50,50],3:0,4:5,5:0}
      {% elif trigger.to_state.state == ‘Shoot / Drip’ %}
      {0:7,2:[255,147,41],8:0,10:1,9:30, 5:0 ,4:255,3:0,12:5,7:0}
      {% elif trigger.to_state.state == ‘Rain’ %}
      {0:8,11:1100}
      {% elif trigger.to_state.state == ‘Rainbow 1’ %}
      {0:12}
      {% elif trigger.to_state.state == ‘Rainbow 2’ %}
      {0:13}
      {% else %}
      {}
      {% endif %}
      retain: false
    • service: input_select.select_option
      data:
      entity_id: input_select.jowisz_mode
      option: ‘Select…’

ale lampki są tylko widoczne lampki w sekcji Wszystkie światła

ale nie wiem jak powinny działać sekcje input_select i automation, ktoś wie ?