@brusli009 wrote:
I have 3 wled controllers in my house and i want to control each one individually(i can do that), but i also want to use mqqt to send data to wled so they can turn on a special preset for each one. I knew how to do one but how do i do multiple.It dosent work like that
Here is my configuration filelight: # Camera - platform: mqtt name: "WLED Camera" command_topic: "wled/camera" brightness_command_topic: "wled/camera" rgb_command_topic: "wled/camera/col" rgb_command_template: "{{ '#%02x%02x%02x' | format(red, green, blue)}}" effect_list: - "[FX=00] Solid" (...) - "[FX=82] Halloween Eyes" input_select1: wled_presets: options: - "[PL=01] Preset 1" (...) - "[PL=16] Preset 16" wled_palette_list1: options: - "[FP=00] Default" (...) - "[FP=49] Sakura" input_number: ledspeed1: name: Speed initial: 0 min: 0 max: 255 step: 1 ledintensity1: name: Intensity initial: 0 min: 0 max: 255 step: 1 # Birou - platform: mqtt name: "WLED Birou" command_topic: "wled/birou" brightness_command_topic: "wled/birou" rgb_command_topic: "wled/birou/col" rgb_command_template: "{{ '#%02x%02x%02x' | format(red, green, blue)}}" effect_list: - "[FX=00] Solid" (...) - "[FX=82] Halloween Eyes" input_select: wled_presets2: options: - "[PL=01] Preset 1" (...) - "[PL=16] Preset 16" wled_palette_list2: options: - "[FP=00] Default" (...) - "[FP=49] Sakura" input_number: ledspeed2: name: Speed initial: 0 min: 0 max: 255 step: 1 ledintensity2: name: Intensity initial: 0 min: 0 max: 255 step: 1 # Sufragerie - platform: mqtt name: "WLED Sufragerie" command_topic: "wled/sufragerie" brightness_command_topic: "wled/sufragerie" rgb_command_topic: "wled/sufragerie/col" rgb_command_template: "{{ '#%02x%02x%02x' | format(red, green, blue)}}" effect_list: - "[FX=00] Solid" (...) - "[FX=82] Halloween Eyes" input_select: wled_presets3: options: - "[PL=01] Preset 1" (...) - "[PL=16] Preset 16" wled_palette_list3: options: - "[FP=00] Default" (...) - "[FP=49] Sakura" input_number: ledspeed3: name: Speed initial: 0 min: 0 max: 255 step: 1 ledintensity3: name: Intensity initial: 0 min: 0 max: 255 step: 1
And my automations folder looks like this
#Camera - id: wled_speed alias: wled_speed Camera trigger: - entity_id: input_number.ledspeed1 platform: state condition: [] action: - data_template: topic: wled/camera/api payload: SX={{ states('input_number.ledspeed1') | int }} service: mqtt.publish - id: wled_intensity alias: wled_intensity Camera trigger: - entity_id: input_number.ledintensity1 platform: state condition: [] action: - data_template: topic: wled/camera/api payload: IX={{ states('input_number.ledintensity1') | int }} service: mqtt.publish - id: wled_palette alias: WLED Palette Camera trigger: - platform: state entity_id: input_select.wled_palette_list1 condition: [] action: - service: mqtt.publish data_template: topic: wled/camera/api payload: "{{ states('input_select.wled_palette_list1') }}" - id: wled_presets alias: WLED Presets Camera trigger: - platform: state entity_id: input_select.wled_presets1 condition: [] action: - service: mqtt.publish data_template: topic: wled/camera/api payload: "{{ states('input_select.wled_presets1') }}" #birou - id: wled_speed alias: wled_speed birou trigger: - entity_id: input_number.ledspeed2 platform: state condition: [] action: - data_template: topic: wled/birou/api payload: SX={{ states('input_number.ledspeed2') | int }} service: mqtt.publish - id: wled_intensity alias: wled_intensity birou trigger: - entity_id: input_number.ledintensity2 platform: state condition: [] action: - data_template: topic: wled/birou/api payload: IX={{ states('input_number.ledintensity2') | int }} service: mqtt.publish - id: wled_palette alias: WLED Palette birou trigger: - platform: state entity_id: input_select.wled_palette_list2 condition: [] action: - service: mqtt.publish data_template: topic: wled/birou/api payload: "{{ states('input_select.wled_palette_list2') }}" - id: wled_presets alias: WLED Presets birou trigger: - platform: state entity_id: input_select.wled_presets2 condition: [] action: - service: mqtt.publish data_template: topic: wled/birou/api payload: "{{ states('input_select.wled_presets2') }}" #sufragerie - id: wled_speed alias: wled_speed sufragerie trigger: - entity_id: input_number.ledspeed3 platform: state condition: [] action: - data_template: topic: wled/sufragerie/api payload: SX={{ states('input_number.ledspeed3') | int }} service: mqtt.publish - id: wled_intensity alias: wled_intensity sufragerie trigger: - entity_id: input_number.ledintensity3 platform: state condition: [] action: - data_template: topic: wled/sufragerie/api payload: IX={{ states('input_number.ledintensity3') | int }} service: mqtt.publish - id: wled_palette alias: WLED Palette sufragerie trigger: - platform: state entity_id: input_select.wled_palette_list3 condition: [] action: - service: mqtt.publish data_template: topic: wled/sufragerie/api payload: "{{ states('input_select.wled_palette_list3') }}" - id: wled_presets alias: WLED Presets sufragerie trigger: - platform: state entity_id: input_select.wled_presets3 condition: [] action: - service: mqtt.publish data_template: topic: wled/sufragerie/api payload: "{{ states('input_select.wled_presets3') }}"
Posts: 1
Participants: 1