Closed PlantsThatsWhatsUp closed 3 months ago
See my PR #119 and my new blueprint.
The idea was all yours but I made it a piece of cake to implement. It currently only notifies on all connects/ disconnects anyway but long term it is intended that the MAC address filters will be able to filter out known devices.
Looks promising! I'll try it out once the PR is accepted. Thanks!
my automation:
alias: Unknown Devices
description: ""
trigger:
- platform: state
entity_id:
- sensor.ubnt_unknown_devices
condition:
- condition: template
alias: Check state changed
value_template: "{{trigger.from_state.state != trigger.to_state.state}}"
action:
- variables:
state: "{{trigger.to_state.state | int}}"
message: "{{trigger.to_state.attributes | join('\r\n') }}"
- if:
- condition: template
value_template: "{{state > 0}}"
then:
- service: notify.mobile_app_samsung_s24_ultra
data:
title: "{{state}} unknown devices"
message: "{{message}}"
data:
tag: Unknown Devices
group: Unknown Devices
color: red
mode: single
Fixed in v2.1.x
Would you consider making these a dict per my pull request? This make it much easier to filter out devices which are shown here (i.e. devices which have a dynamic ip) but are actually known devices e.g. my mobile telephone.
It's a 2 line change and I even have a working blueprint which implements this: https://github.com/illuzn/homeassistant-edgeos-notification/tree/main
Admittedly filtering by MAC address is not entirely secure because of MAC Spoofing but this prevents being spammed with notifications anybody comes home and connects to the network.
Sorry to tag you into this but @elad-bar
Using EdgeRouter-X. Trying to create an automation that when an IP is leased on my network, it notifies me and tells me what device it is. To do that, I need the attribute of unknown devices to update - but it doesn't update for quite a long time. Any clue why? The number changes quickly, but the list doesn't.
This is my automation - want to try this, but seems like a good chance I'll need a helper to store the old list and compare (for people looking to do the same):