Hi,
I’ve got a few devices which are connected to the local Wi-Fi, like phones and laptops.
For example
user1_workmac:
name: User1 Work Mac
mac: 98:XX:XX
icon : mdi:laptop
hide_if_away: false
track: true
user1_personalmac:
name: User1 Personal Mac
mac: 98:XX:XX
icon : mdi:laptop
hide_if_away: false
track: true
How can I show the User1 as “being at home” if one of the two devices are connected to the Wi-Fi ?
And “not at home” if zero devices are on the Wi-Fi ?
I’m currently using nmap for device tracking by the way.
FYI, for the value_template of your Template Sensor, you could also do one of the following. They’re equivalent to your solution, and slightly more compact:
"{{ 'at home' if is_state('group.user1_group', 'home') else 'not at home' }}" "{{ 'not ' if not is_state('group.user1_group', 'home') }}at home"
For your Template Binary Sensor, the value_template only needs to be: