InfluxDB: Device Name/ID as tag

Hi,

I’ve started to integrate esphome into my HA installation, with a simple configuration:

- platform: wifi_signal
  name: "WiFi Signal"
  update_interval: 60s

which reports the wifi signal strength to HA as expected and shows up as the entity sensor.wifi_signal. The device itself is properly recognized in HA with it’s name test1. However, the metrics send to InfluxDB do not contain any device id. So with a second/third device with the same configuration, I’m unable to distinguish the devices. The only tags available on the InfluxDB records are domain, which is set to sensor and entity_id which is set to wifi_signal.

I’ve tried tags_attributes in the HA InfluxDB configuration, but this directive only copies attributes from the State object as tags and the tags options is a static mapping of tags.

Sure, i could rename each entity to something like sensor.test1_wifi_signal but this becomes tedious really fast. Is it possible to send the device id (test1 in this case) as a tag to InfluxDB?

Thanks