Hello,
I’m trying to create a trigger sensor with following code.
Is this correct with the actual syntax - can’t only finde triggers and numeric_stae within automation docs but not in template sensor guide.
I only want to capture actual timestamp (now()) if power meter measures more than 1 Watt for 5 secs.
- trigger:
- platform: numeric_state
above: 1
for: "00:00:05"
entity_id: sensor.tasmota_waschmaschine_energy_power
sensor:
- name: Waschmaschine Startzeit
unique_id: sensor.waschmaschine_startzeit
device_class: timestamp
state: >
{% if trigger %}
{{ now() }}
{% else %}
"Waschmaschine ausgeschaltet"
{% endif %}
This doesn’t work and I can’t finde the mistake - Studio Code Server mars the -platform: numeric_state
as legacy…
What’s wrong here?
Thank you in advance!
BR