Two different entities for two different actions in a single Picture Element

Hello,

Does anybody know if it’s possible to control two different entities (input_booleans) depending on action or hold_action being used within the same picture element?

My lights are normally switched by the PIR sensors. I have a delay of 20 seconds after de PIR sensors last seen movement. This delay together with the ON state of the PIR sensor are conditions of the turn.off service for the input_boolean. I would like to by-pass the condition with a different entity as shown below. HA doesn’t accept this, most likely because it only accepts one entity.

  - type: image
    entity: input_boolean.main_cinema_lights
    tap_action:
      action: toggle
    hold_action:
      action: toggle
      entity: input_boolean.main_cinema_lights_nodelay
    image: /local/CinemaLOff.png
    state_image:
      'on': /local/CinemaLOn.png
      'off': /local/CinemaLOff.png

I have also tried to use services and a bunch of other options but I can’t get it to work.

  - type: image
    entity: input_boolean.main_cinema_lights
    tap_action:
      action: toggle
    hold_action:
      action: call-service
      service: input_boolean.turn_on
      service_data:
        entity_id: input_boolean.main_cinema_lights_nodelay
        option: None

Any kind of feedback is much appreciated.
Thanks.

  - type: image
    entity: input_boolean.main_cinema_lights
    tap_action:
      action: toggle
    hold_action:
      action: call-service
      service: input_boolean.toggle
      service_data:
        entity_id: input_boolean.main_cinema_lights_nodelay
1 Like

Thank you for your quick reply. I was closer than I thought.
It works perfectly. Thank you very much.