[FR] Add ability to send variables when calling scripts thru tap-action
larry-glz opened this issue · comments
larry-glz commented
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
ildar170975 commented
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.
larry-glz commented
Replace the template by a value and see what happens.
it worked. thanks
ildar170975 commented
Close the issue then
larry-glz commented
"Add" in the title implied a feature request. I'll add FR and keep open