[Button>Action>Data] How can I pass an entity's state or datetime to an action's data #1820
Answered
by
pterhu
pterhu
asked this question in
Questions about config, custom styles and templates
-
GoalI've an input_datetime entity and want to update its state with the current date. Source Yamltype: custom:bubble-card
card_type: button
button_type: state
entity: input_datetime.last_watering_date
tap_action:
action: perform-action
target:
entity_id: input_datetime.last_watering_date
perform_action: input_datetime.set_datetime
data:
timestamp: {{ Date.now() }} Which step did you already try?type: custom:bubble-card
card_type: button
button_type: state
entity: input_datetime.last_watering_date
tap_action:
action: perform-action
target:
entity_id: input_datetime.last_watering_date
perform_action: input_datetime.set_datetime
data:
date: {{ states('sensor.date') }} ProblemI've problem with data fields, I cannot pass the appropriate value.. Any suggestion? Thank you Read the documentation
|
Beta Was this translation helpful? Give feedback.
Answered by
pterhu
Sep 11, 2025
Replies: 1 comment 1 reply
-
This is a workaround: I made a script which does not require parameter and I'm calling it from button.. The script:
Bubble card:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Clooos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a workaround: I made a script which does not require parameter and I'm calling it from button..
The script:
Bubble card: