I am working on a chore card for the house and am using a generic script in order to do so. I have completion of the chore working, but am having a hard time getting the {{user}} field from the lovelace UI to pass the normal value we would expect to see. Instead, it is passing the actual string “{{user}}” and moving that into the field I have to show who completed it. Does anyone know how to get the active user passed into a scripts service data? Also, pardon the not so great yaml. I’m still learning.
Script Call:
type: custom:mushroom-entity-card
icon: mdi:trash-can-outline
fill_container: false
tap_action:
action: perform-action
perform_action: script.1747947032739
data:
chore_entity: input_boolean.chore_trash
input_select_chore: input_select.chore_trash_completer
user_run: "{{user}}"
target: {}
entity: input_boolean.chore_trash
primary_info: name
secondary_info: state
hold_action:
action: none
double_tap_action:
action: none
name: Chore -Take Out Trash
Script Configuration:
sequence:
- if:
- condition: template
value_template: "{{is_state('chore_entity','off')}}"
then:
- action: input_boolean.toggle
metadata: {}
data: {}
target:
entity_id: "{{chore_entity}}"
- action: input_select.set_value
metadata: {}
data:
option: "{{user_run}}"
target:
entity_id: "{{input_select_chore}}"
alias: Chore Completion
icon: mdi:broom
mode: single
description: ""
fields:
user_run:
selector:
template: {}
name: user_run
default: ""
required: true
chore_entity:
selector:
entity: {}
required: true
name: chore entity
input_select_chore:
selector:
entity: {}
name: input_select_chore
required: true