Sorry. I’m bumping this - can anyone help please ?
I have something - Do I need to create a time sensor or value template as this does not work for me, resulting in the same error
alias: _A_TEST
description: ""
triggers:
- trigger: time
at: "{{ state_attr('sensor.mc', 'd') }}"
id: MY-Zuhr
conditions: []
actions:
- action: logbook.log
metadata: {}
data:
name: TEST
message: trigger id = {{ trigger.id }}
mode: single
The output of "{{ state_attr('sensor.mc', 'd') }}" is in the correct format HH:MM:SS but I’m still getting
Message malformed: Expected HH:MM, HH:MM:SS, an Entity ID with domain 'input_datetime' or 'sensor', or a combination of a timestamp sensor entity and an offset. @ data['at'][0]
at does not support templates. You could create a template sensor helper with a similar template and a timestamp device class (note the requirement for it to be a datetime object or ISO8601 string) and use that sensor’s entity ID.
I’ve extracted the key bits from the docs, told you that templates won’t work, and given you a state trigger for a template sensor helper. Use it like this:
You simply need to create / update a sensor with an ISO8601 string (including the T!) as its state (not an attribute), and a device_class of timestamp.