Service input_boolean.turn_on/off not working in Browser Mod

Hi,

I’m making a custom popup card as part of browser mod. However the left/right button actions are not working. I’m on version 2023.4.1.
See code below. My input.boolean is a Helper (Toggle).

type: custom:popup-card
entity: switch.tapo_04
dismissable: true
card:
  type: vertical-stack
  cards:
    - type: thermostat
      entity: climate.mill_heatergen3panel
      name: Badkamer thermostaat
    - type: entities
      entities:
        - entity: input_datetime.badkamer_time_on
right_button: Timer aan
left_button: Timer uit
right_button_action:
  service: input_boolean.turn_on
  data: {}
  target:
    entity_id: input_boolean.badkamer_thermostaat_timer
left_button_action:
  service: input_boolean.turn_off
  data: {}
  target:
    entity_id: input_boolean.badkamer_thermostaat_timer

When I click my left (Timer uit) or right (Timer aan) button on the popup card, I get following message and the state of my input_boolean does not change:

“Failed to call service input_boolean/turn_on must contain at least one of entity_id, device_id, area_id.”

Thanks

1 Like

Solved it myself!

The correct code in browser 2.0 for this is:

right_button: Timer aan
left_button: Timer uit
right_button_action:
  service: input_boolean.turn_on
  data:
    entity_id: input_boolean.badkamer_thermostaat_timer
left_button_action:
  service: input_boolean.turn_off
  data:
    entity_id: input_boolean.badkamer_thermostaat_timer

so no brackets {} and no target:, only data:

Which I found a little bit strange because when testing code in the Developer Tools/Services, it will generate this code for switching the input_boolean:

service: input_boolean.turn_on
data: {}
target:
  entity_id: input_boolean.badkamer_thermostaat_timer
1 Like