I’ve several device trackers active in Fritzbox Tools, most via WLAN and 2 PCs via LAN. One is recognized fine by HA, but the second stays “at home” forever. I’ve already deleted the device in Fritzbox as well as entity in HA but issue still remains. Looking at debug log, there are some entries “new host” at point in time when the PC is powered off.
In Fritzbox, PC is shown as “not active”
Any suggestions?
As spending more time seemed to be useless I created a workaround, may someone find it helpful.
Idea is to reload config entry via automation in case that PCs “last seen time” is older than 5min and PC is still shown as “home”.
Binary sensor to discover this:
- binary_sensor:
- name: "gamingpc_not_home"
state: >
{% if (now () - timedelta( hours = 0, minutes = 5)) > state_attr('device_tracker.gamingpc', 'last_time_reachable') | as_datetime %}
{{ "on" }}
{% else %}
{{ "off" }}
{% endif %}
Automation to trigger config reload:
alias: Reload config gamingpc
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.gamingpc_not_home
to: 'on'
condition:
- condition: device
device_id: c894b436e5d0c83e924a164312b4c24c
domain: device_tracker
entity_id: device_tracker.gamingpc
type: is_home
action:
- service: homeassistant.reload_config_entry
data: {}
target:
entity_id: device_tracker.gamingpc
mode: single