I want calculate the difference between 2 sensor data.
This is part of my configuration.yaml:
sensor:
.
.
.
#Sensoren, um den prozentualen Unterschied zwischen 2 Luftfeuchtigkeitswerten zu berechnen
- platform: template
sensors:
my_sensor:
value_template: {{ (states('sensor.einfahrt_multisensor_absolutehumidity') | float / states('sensor.cave_bad_multisensor_absolutehumidity') | float*100) |round(2) }}
and I get this error:
Error loading /config/configuration.yaml: invalid key: "OrderedDict([("(states('sensor.einfahrt_multisensor_absolutehumidity') | float / states('sensor.cave_bad_multisensor_absolutehumidity') | float)*100 |round(2)", None)])"
in "/config/configuration.yaml", line 91, column 0.
When I try the code in developers tool/template everything is fine. I don`t know what I am doing wrong so please could someone give me an advice?
Thanks a lot.
I have a automation in the night. And my vacuum clean must clean the room, but only a few weeks a week.
But when I used the the cleaner manuell in the week at this day, the cleaner mussed not clean in the night again.
I only get a template with the laced. changed but not in Kombination with a State.
How is this possible?
Here is my Script:
alias: Rollladen WohnzimmertĂĽr Gute Nacht
description: Der Rollladen an der WohnzimmertĂĽr startet das Gute nacht Programm
trigger:
condition: state
state: open
entity_id: sensor.sensor_fenstergriff_badezimmer_state_2
attribute: value_state
then:
service: notify.mobile_app_iphone
data:
message: Badezimmerfenster ist auf
if:
condition: state
entity_id: input_boolean.jemand_da
state: “on”
then:
service: light.turn_on
data: {}
target:
device_id: 153cd4cf44e97dcaf9781da85042af7b
alias: Wenn jemand da ist, Kellerlicht an
if:
condition: time
weekday:
thu
sat
tue
condition: template
value_template: >-
{{ (as_timestamp(now()) -
as_timestamp(states.vacuum.r2104_cloud_742471.last_changed)) > 90000
}}
alias: Die letzte Ă„nderung am Staubsauger ca einen Tag her ist
then: