Hello,
I have the next problem and I wish that someone helps me!
Warrnig_ I’m a noob
I have the motor which is connected to a socket (tasmota,mqtt) and I want to monitor 2 things.
The first one is to measure when the motor is operating or standing still and the second is that I want to create a sensor that will measure how much time passed when the motor is moving and when the motor is standing. When the motor is operating its power is > 2.5. When the motor is stoped then power is less than 2.5
- platform: template
sensors:
motor_moving_resting:
friendly_name: "MotorMan"
unit_of_measurement: "Watts"
value_template: "{{ states("sensor.uticnica_12_12_energy_power") | float}}
{% if states('sensor.uticnica_12_12_energy_power') | float > 2.5 %}Operating
{% else %}Standstill
{% endif %}
When I test this code in Developer tools - Templates, I can see it’s working ok.
When i paste this code into conf.yaml I get next error:
Can anyone help me how to solve this error:
can not read a block mapping entry; a multiline key may not be an implicit key at line …:
{% endif %}
^
Thx