Location based notification driving me mad

This is driving me mad. I want a notification to trigger when someone comes home, and the other person is out. Can anyone help me please?

- id: information2
   alias: tell_a_that_b_is_home
   hide_entity: true
   trigger:
    platform: state
    entity_id: device_tracker.b
    from: 'not_home'
    to: 'home'
   condition:
    condition: state
    entity_id: device_tracker.a
    state: 'not_home'
   action:
    - service: notify.a
      data:
       message: 'A has arrived home safely'

The notification works as when I fire a test trigger I receive it, so it must be something to do with my logic.

I’ve tried setting the states in the UI to test, and no notification.

All and any help appreciated.

It is Friday and it is late. And I seem to have had a brain fart. Just retested it, and it works.

Looks like I had to reload HA entirely, not just reload automations.