Input select in scene does not trigger automation and scene

Is there a restriction in how input_selects work in scenes combined with an input_boolean?

The combination of a input_select and a input_bolean does not work in a scene.
my usb automation/script dont trigger anymore.
When i delete the input_boolean my usb works again…
The boolean does work
i have the same script for off with the right states, same problem!

- id: '1699019809471'
  name: test
  entities:
    input_select.usblamp:
      options:
      - uit
      - aan
      - flame
      - wit
      - play
      - dim
      - snel
      - rood
      - blauw
      - groen
      - paars
      - roze
      - oranje
      - grijs
      editable: true
      icon: mdi:coach-lamp
      friendly_name: usblamp
      state: flame
    input_boolean.kaarsen:
      editable: true
      icon: mdi:candle
      friendly_name: kaarsen
      state: 'on'
  metadata:
    input_select.usblamp:
      entity_only: true
    input_boolean.kaarsen:
      entity_only: true

Context
Use a rpi4b, with latest beta hass in docker

Is the automation and script debug trace telling anything?
Does your scene work when you activate it?
Your automation/ script code would be helpful.

It concerns two ir lamps. Both are served by a broadlink script at the end that does the trick, sending the ir command.
Ir device kaarsen, has only a on or off, so thats easy, It uses an input boolean for that and a automation to call the default broadlink script.
The other ir lamp is much complexer with lots of colors that has to be reset and count. This also works great.
Combination of these two entities in a scene to combine them for example scene evening did work with 6 other normal rfx lamps in the scene till i combined a boolean and a input select in the scene.
When i execute the scene manually it is not working, when putting these two devices in separate scenes and exec them manually its working. So strange
script.1697882284549 is the generic broadlink script that serves them both.

The usblamp also contains some “trials” toe play with speach, not interesting for this part
and it turns on the receiver by turning on a walloutlet which also enables the ir receiver , i have to reset the ir integration for that. I can disable the speech and all the startup receiever stuff to make it more easier…

alias: usblamp
description: >-
  moet mode parallel, anders kun je met een script niet en de usb_spraak
  verwerken en zichzelf nogmaals starten voor de afhandeling via de usb_knop
trigger:
  - platform: state
    entity_id:
      - input_select.usblamp
    id: usb_knop
  - platform: conversation
    command:
      - Zet usblampxx op {color}
    id: usb_spraak
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - usb_knop
          - condition: state
            entity_id: switch.ac_0e672c2_13
            state: "off"
        sequence:
          - service: input_boolean.turn_on
            data: {}
            target:
              entity_id: input_boolean.ir_receiver
          - delay:
              hours: 0
              minutes: 0
              seconds: 60
              milliseconds: 0
            enabled: true
          - service: homeassistant.reload_config_entry
            data:
              entry_id: 6e385ed7335c6a8d050336b57684d290
            enabled: true
          - delay:
              hours: 0
              minutes: 0
              seconds: 60
              milliseconds: 0
            enabled: true
          - service: script.turn_on
            data:
              variables:
                keuze: "{{ keuze }}"
            target:
              entity_id: script.1697882284549
      - conditions:
          - condition: trigger
            id:
              - usb_knop
          - condition: state
            entity_id: switch.ac_0e672c2_13
            state: "on"
        sequence:
          - service: script.turn_on
            data:
              variables:
                keuze: "{{ keuze }}"
            target:
              entity_id: script.1697882284549
      - conditions:
          - condition: trigger
            id:
              - usb_spraak
        sequence:
          - service: input_select.select_option
            data:
              option: "{{ trigger.slots.color }}"
            target:
              entity_id: input_select.usblamp
            enabled: true
          - service: tts.google_translate_say
            data:
              entity_id: media_player.chromecast_huiskamer_nest
              message: De usblampxx  krijgt de waarde {{ trigger.slots.color }}
              cache: true
              language: nl
            enabled: true
variables:
  keuze: "{{ states('input_select.usblamp') }}"
mode: parallel
max: 2

alias: kaarsen
description: zet kaarsen aan of uit is broadlinktechnologie
trigger:
  - platform: state
    entity_id:
      - input_boolean.kaarsen
    to: "on"
    id: kaarsen_aan
  - platform: state
    entity_id:
      - input_boolean.kaarsen
    to: "off"
    id: kaarsen_uit
condition: []
action:
  - service: script.turn_on
    data:
      variables:
        keuze: "{{trigger.id}}"
    target:
      entity_id: script.1697882284549

alias: broadlink
variables:
  aantal: 1
  keuze: "{{ keuze if keuze is defined else \"flame\" }}"
sequence:
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ keuze == 'uit' }}"
        sequence:
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_usb
              command: usb_off
            target:
              device_id: b172ac3231c97232b896085e70ecd849
      - conditions:
          - condition: template
            value_template: "{{ keuze == 'aan' }}"
        sequence:
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_usb
              command: usb_on
            target:
              device_id: b172ac3231c97232b896085e70ecd849
      - conditions:
          - condition: template
            value_template: "{{ keuze == 'flame' }}"
        sequence:
          - service: mqtt.publish
            data:
              qos: "1"
              topic: homeassistant
              payload: "{\"name\":\"usblamp\",\"stype\":\"Switch\",\"nvalue\":1,\"svalue1\":20}"
            enabled: false
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_usb
              command: usb_off
            target:
              device_id: b172ac3231c97232b896085e70ecd849
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_usb
              command: usb_on
            target:
              device_id: b172ac3231c97232b896085e70ecd849
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_usb
              command: usb_candle
            target:
              device_id: b172ac3231c97232b896085e70ecd849
      - conditions:
          - condition: template
            value_template: "{{ keuze == 'wit' }}"
        sequence:
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_usb
              command: usb_off
            target:
              device_id: b172ac3231c97232b896085e70ecd849
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_usb
              command: usb_on
            target:
              device_id: b172ac3231c97232b896085e70ecd849
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_usb
              command: usb_white
            target:
              device_id: b172ac3231c97232b896085e70ecd849
      - conditions:
          - condition: template
            value_template: "{{ keuze == 'play' }}"
        sequence:
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_usb
              command: usb_play
            target:
              device_id: b172ac3231c97232b896085e70ecd849
      - conditions:
          - condition: template
            value_template: "{{ keuze == 'dim' }}"
        sequence:
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_usb
              command: usb_bright
            target:
              device_id: b172ac3231c97232b896085e70ecd849
      - conditions:
          - condition: template
            value_template: "{{ keuze == 'snel' }}"
        sequence:
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: broadlink_speed
              command: usb_speed
            target:
              device_id: b172ac3231c97232b896085e70ecd849
      - conditions:
          - condition: template
            value_template: "{{ keuze == 'kaarsen_aan' }}"
        sequence:
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: kaars
              command: kaars_aan
            target:
              device_id: b172ac3231c97232b896085e70ecd849
      - conditions:
          - condition: template
            value_template: "{{ keuze == 'kaarsen_uit' }}"
        sequence:
          - service: remote.send_command
            data:
              num_repeats: 1
              delay_secs: 0.4
              hold_secs: 0
              device: kaars
              command: kaars_uit
            target:
              device_id: b172ac3231c97232b896085e70ecd849
    default:
      - service: remote.send_command
        data:
          num_repeats: 1
          delay_secs: 0.4
          hold_secs: 0
          device: broadlink_usb
          command: usb_off
        target:
          device_id: b172ac3231c97232b896085e70ecd849
      - service: remote.send_command
        data:
          num_repeats: 1
          delay_secs: 0.4
          hold_secs: 0
          device: broadlink_usb
          command: usb_on
        target:
          device_id: b172ac3231c97232b896085e70ecd849
      - variables:
          actcolor: "{{ states('input_select.usblamp') }}"
          rooms:
            rood: "1"
            groen: "2"
            blauw: "3"
            oranje: "4"
            grijs: "5"
            roze: "6"
            paars: "7"
          lampaantal2: "{{ rooms.get(actcolor, '') }}"
      - repeat:
          count: "{{lampaantal2}}"
          sequence:
            - service: remote.send_command
              data:
                num_repeats: 1
                delay_secs: 0.4
                hold_secs: 0
                device: broadlink_usb
                command: usb_color
              target:
                device_id: b172ac3231c97232b896085e70ecd849
icon: mdi:home
mode: single

Tracing and debugging is a step to far, i am a newbie :slight_smile:

Hi pedolsky, I found it!
There wasn’t an error in my scripts…
I made a script that did the same as a scene woukd do, and the same problem, one ir lamp does not go on or off. And every entitie was is the correct end-state.

Problem is the speed of the handling in the scene :frowning:
the on/off commands come to quick for the broadlink ir devices…
After making a delay in my script (1 second) it worked fine

Is there a way to create a delay between entities in a scene :slight_smile:
Otherwise i make my own on/off script/scene

1 Like

Ah, cool, that you found it out.
I’m not aware of such a possibility, use a script instead.

Yeah, i did!
For those who need it, and thanks pedolsky

alias: test_avond
variables:
  keuze1: "{{ keuze1 if keuze1 is defined else \"uit\" }}"
  keuze2: "{{ keuze2 if keuze2 is defined else \"off\" }}"
sequence:
  - service: input_boolean.turn_{{keuze2}}
    data: {}
    target:
      entity_id: input_boolean.kaarsen
    enabled: true
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: input_select.select_option
    data:
      option: "{{keuze1}}"
    target:
      entity_id: input_select.usblamp
    enabled: true
icon: mdi:home
mode: single
type or paste code here

problem was that two broadlink entities in a scene, one did not fire
solution: use a script instead of scene with a pause…