Automation with WLAN Presence?

Hi there,

I’m new to Home Assistant and my first problem now is simple automation with WiFi presence. I added my device and light with HomeAssistant and now I get stuck

My test automations are Test Come Home and Test Leave Home, but they don’t work.

I’m in the YAML Editor on the Web GUI and don’t know what needs to be set and how.
For Home Coming

platform: state
entity_id: device_tracker.manuel
from: not_home
to: home

type: turn_on
device_id: adc8970922c68f67b567be89f1326315
entity_id: light.tischleuchte
domain: light
brightness_pct: 100

And for leaving

platform: state
entity_id: device_tracker.manuel
from: home
to: not_home

type: turn_off
device_id: adc8970922c68f67b567be89f1326315
entity_id: light.tischleuchte
domain: light

But this works not. What made I wrong?

maNu