benct / lovelace-multiple-entity-row

Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FR] Add ability to send variables when calling scripts thru tap-action

larry-glz opened this issue · comments

I'm trying to run a script via a button on the entity row. However, it seems variables (fields) are not passed to script via "service-data". See below:

entity: switch.schedule_well_watering_corral
type: custom:multiple-entity-row
name: Corral
secondary_info:
  attribute: weekdays
toggle: true
state_color: true
entities:
  - entity: script.well_watering_program_test
    name: ' '
    icon: mdi:play
    state_color: true
    tap_action:
      action: call-service
      service: script.turn_on
      service_data:
        entity_id: script.well_watering_program_test
        variables:
          watering_runtime: '{{ states(''input_number.well_watering_runtime_corral'') }}'

thanks

However, it seems variables (fields) are not passed to script via "service-data"

Probably because m-e-r card does not support templates.
Replace the template by a value and see what happens.

Replace the template by a value and see what happens.

it worked. thanks

Close the issue then

"Add" in the title implied a feature request. I'll add FR and keep open