Display name of wifi router instead of BBSID

Hi,
I have a sensor that shows BSSID mac that the esp device is currently connected to.
Instead I would like to show friendly name of the router, let say if BBSID= 50:TF:23:1R:FA:6F, then show Router_1, if BBSID= 10:TF:23:1R:FA:GF then show Router_2
Please suggest best practices how to do it.

thanks!

- platform: wifi_info
******
    bssid:
      name: ${location}_esp_connected_BSSID
********

You may also want this:

I think he wants something other than ssid or bssid. For example I have 4 ubiquiti APs, all using the same ssid, but of course different bssids.

so if you grab the bssid and do a template, you can generate a name like “garage ap”.

Oh, that’s right.
(Duh: I hadn’t noticed that’s what he was already using.)
Too bad there’s not a quick way to do a reverse-nslookup on the BSSID to get its DNS name from the DHCP server but I agree, a local lookup table would be best for short lists.

There is no need for local lookup etc.
I have 3 Aps and I know their BSSIDs - this is constant. So task is quite simple if BSSID=x then some_text_sensor = “Garage AP”, if if BSSID=y them some_text_sensor = “Living room AP”.
I just cant figure out how to program that.

by “local lookup” I was referring to a simple bit of code that was, perhaps, a series of if/then/else’s which compare the BSSID to a series of known MACs, and emitted the associated name.
Nothing more complex than that.

hi Gleb1982

did you manage to solve it ??
if not I think I have solution for it .

The answers have been given above.

I was thinking of taking it one step further.
I have three APs all broadcasting the same SSID
So I’d like to create a dashboard with a card for each AP and list the clients connected to it.
Has anyone done something like that?

In case anyone asks, this is useful for fine tuning the Router tx Power so clients connect to the best AP.

I do exactly this in ha with the custom:auto-entities card

card:
  title: 'AP: Main (00:11:22:33:44:55)'
  type: entities
filter:
  include:
    - name: /BSSID/
      state: 00:11:22:33:44:55
sort:
  method: state
  numeric: true
type: custom:auto-entities

Thanks tabularasa the auto-entities card works great.

Since each of my APs broadcast 6 ssids, I display the ssid and signal strength for each device connected to the AP. Its just what I need to make sure my network is tuned properly.

SO I tried this card, and now I get a nice card that says the name of the AP I put in the card.
yet, I am not able to see what clients are connected to it,

in an ideal situation I could just translate cellphone BSSID:mac to an entity
cellphone BSSID:easy name.

yes , I’m a newb, pls help