Set location upon device tracker ap_mac change

I want to display a location on the front end depending on the ap_mac address my phone is currently connected to. I don’t think there is a way to add a custom attribute to a device tracker (right?) so I want thinking of have a Node Red script detect when my phone device tracker ap_mac changes, look up in a table the location name of the access point, then set the location as a text entry on another sensor, and display that sensor’s text on the front end. Does that make sense? Is there a better way to do that?