Please explain this message to me

Hi all,

I have HA installed in a container and this automation:

- id: '1669668066530'
  alias: 'Geofence: Switch On & Off Video Detection'
  description: ''
  trigger:
  - platform: numeric_state
    entity_id: proximity.home
    below: 100
    id: approaching-home
  - platform: numeric_state
    entity_id: proximity.home
    above: 100
    id: leaving-home
  condition: []
  action:
  - choose:
    - conditions:
      - condition: trigger
        id: approaching-home
        enabled: true
      sequence:
      - service: switch.turn_off
        data: {}
        target:
          entity_id: switch.villa333_detect
      - service: notify.mobile_app_pixel_4a
        data:
          message: Turning OFF Motion Detection
          title: You are just about home.
    - conditions:
      - condition: trigger
        id: leaving-home
      sequence:
      - service: switch.turn_on
        data: {}
        target:
          entity_id: switch.villa333_detect
      - service: notify.mobile_app_pixel_4a
        data:
          message: Turning ON Motion Detection.
          title: You have left home.
  mode: single

I’m getting this warning in the HA log:

2022-12-05 16:13:15.236 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Geofence: Switch On & Off Video Detection' trigger: In 'numeric_state' condition: entity proximity.home state 'not set' cannot be processed as a number

The automation works, so can someone please explain the WARNING.

TIA

It means that your entity proximity.home has state not set when this automation was triggered, which can not be converted to a number.

Is it possible that this entity has a state not set after startup or intermittently? It seems as if the numeric_state trigger does cater for unavailable and unknown, but not for not set.

Thank you for your reply.

So, am I understanding there’s no way to fix this warning and I should not worry about it.

I can’t see a any way to fix this within the trigger. I just found these issues reported about the same issue:

Perhaps you could use a value_template to filter out the not set state. Automation Trigger - Home Assistant