custom-components / authenticated

A platform which allows you to get information about sucessfull logins to Home Assistant.
MIT License
82 stars 28 forks source link

Exclude from api but include in the sensor #74

Open Salvora opened 2 years ago

Salvora commented 2 years ago

Is your feature request related to a problem? Please describe. I want to see who logged in from my local network but I want to exclude these from the api calls.

Describe the solution you'd like Add a seperate exclude option to api part like this

  api:
    provider: 'ipapi'
    exclude:
      - "local ip"
      - "other ip"

I am not sure how this works but it will be helpful to reduce unnecessary api calls.

mikael-andersson commented 2 years ago

Without knowing much about this integration it seems like a good idea. I first thought that exclude actually was meant to deny authentication but maybe it only has to do with the logging as you seem to think.

mikael-andersson commented 2 years ago

Maybe it would be clearer to have two attributes such as:

Name suggestions to exclude from logging

log_exclude, exclude_log, filter_ip

Name suggestions to deny/block authentication

deny_ip, block_ip, deny_auth, block_auth