Device Tracker with ping does not trigger automation

This automation is working as intended when im triggering it by hand.
However my Device Tracker isn’t triggering it and I cant figure it out myself.

Here is my known_devices.yaml

kathi_handy:
  hide_if_away: false
  icon:
  mac:
  name: Kathi
  picture:
  track: true
  
thomas_handy:
  hide_if_away: false
  icon:
  mac:
  name: Thomas
  picture:
  track: true

This is part of my configuration.yaml

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

zwave:
  usb_path: /dev/ttyACM0
    
device_tracker:
  - platform: ping
    interval_seconds: 30
    consider_home: 1200
    hosts:
      thomas_handy: 192.x.x.x
      kathi_handy: 192.x.x.x

logger:
  default: info
  logs:
    homeassistant.components.yamaha: critical
    custom_components.my_integration: critical

and finally my automation.yaml

### Service 

- id: heizung-aus
  alias: 'Heizung aus'
  hide_entity: False
  
  trigger:
    platform: state
    entity_id: device_tracker.handy_thomas
    from: 'home'
    to: 'not_home'
  action:
    - service: climate.set_temperature
      data:
        entity_id: climate.thermostat_wohnzimmer_heating_1
        temperature: 16
        target_temp_high: 16
        target_temp_low: 16
        hvac_mode: heat
    - service: climate.set_temperature
      data:
        entity_id: climate.thermostat_schlafzimmer_heating_1_2
        temperature: 16
        target_temp_high: 16
        target_temp_low: 16
        hvac_mode: heat
    - service: climate.set_temperature
      data:
        entity_id: climate.thermmostat_bad_heating_1_3
        temperature: 16
        target_temp_high: 16
        target_temp_low: 16
        hvac_mode: heat
    - service: climate.set_temperature
      data:
        entity_id: climate.thermostat_kche_heating_1_4
        temperature: 16
        target_temp_high: 16
        target_temp_low: 16
        hvac_mode: heat
    - service: persistent_notification.create
      data:
        message: '{{ now().strftime("%H:%M %Y-%m-%d") }}: Heizung wird ausgeschalten'
        title: "Heizung: AUS"

- id: heizung-an
  alias: 'Heizung: an'
  hide_entity: False
  
  trigger:
    platform: state
    entity_id: device_tracker.handy_thomas
    from: 'not_home'
    to: 'home'
    
  action:
    - service: climate.set_temperature
      data:
        entity_id: climate.thermostat_wohnzimmer_heating_1
        temperature: 22
        target_temp_high: 22
        target_temp_low: 22
        hvac_mode: heat
    - service: climate.set_temperature
      data:
        entity_id: climate.thermostat_schlafzimmer_heating_1_2
        temperature: 19
        target_temp_high: 19
        target_temp_low: 19
        hvac_mode: heat
    - service: climate.set_temperature
      data:
        entity_id: climate.thermmostat_bad_heating_1_3
        temperature: 22
        target_temp_high: 22
        target_temp_low: 22
        hvac_mode: heat
    - service: climate.set_temperature
      data:
        entity_id: climate.thermostat_kche_heating_1_4
        temperature: 21
        target_temp_high: 21
        target_temp_low: 21
        hvac_mode: heat
    - service: persistent_notification.create
      data:
        message: '{{ now().strftime("%H:%M %Y-%m-%d") }}: Heizung wird eingeschalten'
        title: "Heizung: AN"

The ping seems to work as well, I can see when someone leaves the network the entity is shown as away.

Any ideas what I did wrong?

You must be dyslexic like me :stuck_out_tongue_winking_eye:

    entity_id: device_tracker.handy_thomas

should be:

    entity_id: device_tracker.thomas_handy
1 Like

Oh no!
I switched back and forth so often, but never really checked the names.
I’ll try this now

1 Like

Thanks a lot, my little rubber duck :slight_smile: