Hello!
I wanne creat a sleep sensor template.
If my phone is connected to my Wifi and my Phone is charged wireless i wanne see the value “slapen”, if 1 of the two criteria is not met then i am “wakker”
This is my code in my Configuration files, what do i have wrong?
######### Slaap sensor #######
- platform: template
sensors:
erik_slapen_of_wakker:
value_template: >-
{% if states('sensor.samsung_erik_wifi_connection') == "FamWegerif" %},
{% if states('sensor.samsung_erik_charger_type') == "wireless" %}
Slapen
{% else %}
Wakker
{% endif %}
friendly_name: 'Erik slapen of wakker'