Error with proximity

I am trying to run some automations I found on a blog that is supposed to be working but whenever both devices report as away or are arriving I get errors in the logs like:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57 in
result = self.fn*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassitant/components/proximity/init.py”, line 192, in check_proximity_state_change
if device_state.state in self.ignored_zones:
AttributeError: ‘NoneType’ object has no attribute ‘state’

Glad to share my automation just don’t have cut and paste access to my server right ow so all the above was hand typed. Will share the part I would guess triggered this:

 - alias: 'Away Mode'
   initial_state: 'on'
   trigger:
     platform: state
     entity_id: group.everyone
     to: 'not_home'
   action:
     - service: notify.ios_johniosapp
       data: 
         message: "no one home"

Thanks.

JR

The errors seem to indicate an error in the proximity component so would need to see your proximity definition. The code posted has nothing to do with the proximity component as far as I can tell.

Here is my proximity info:

proximity:
  home:
    devices:
      - device_tracker.johniosapp
      - device_tracker.sueiosap
    tolerance: 50 #In meters
    unit_of_measurement: mi #Used for travel distances
  john:
    devices:
      - device_tracker.johniosapp
    tolerance: 50 #In meters
    unit_of_measurement: mi #Used for travel distances
  sue:
    devices:
      - device_tracker.sueiosapp
    tolerance: 50 #In meters
    unit_of_measurement: mi #Used for travel distances

And then these groups:

everyone:
  name: Whole House
  entities:
    - group.john
    - group.sue

john:
  name: John
  entities:
    - device_tracker.johniosapp
    - device_tracker.john_s_iphone_unifi

sue:
  name: Sue
  entities:
    - device_tracker.sueiosapp
    - device_tracker.sue_s_iphone_unifi

Do you have (or did you have) ignored_zones defined somewhere because that seems to be what the system it’s complaining about.

Nope. I just added ignore zones in to see if that helps but literally did it 30 seconds ago.

proximity:
  home:
    ignored_zones:
      - work
      - lsp
      - Wood
      - Costco
    devices:
      - device_tracker.sueiosapp
      - device_tracker.johniosap
    tolerance: 50 #In meters
    unit_of_measurement: mi #Used for travel distances

Wasn’t sure if NOT defining the zones to ignore would confuse the system so just added the above.

Is this related to the other proximity issue you have on the board? Perhaps the error is the automation and fixing that will solve everything.

Yeah not sure. Have not had any responses to any of them so unsure. Trying to post pieces as it seems talking about the whole doesn’t get any takers.

JR