Multiple devices of same type - can they use the same firmware

I’m trying to get up to speed with HomeAssistant at the moment and would appreciate some help. Using the ESPHome addon, I have added an ESP32 device with an htu21d sensor and that is giving me temperature and humidity readings in the HA Dashboard - great start!

Questions:

  1. I wanted to correct the temperature reading and added to the device yaml file “filters:” and “offset: -4.1” which worked fine to correct temperature but I seemed to have to recompile and reinstall the firmware - is that the best way to calibrate devices? - I assumed there would be a way to set calibration values in a text file which the firmware reads from its flash - is that possible? What is the recommended way to calibrate individual devices? - Surely not to have custom firmware for every device?

  2. I want to have multiple identical temp and humidity sensors around my house. Do I have to effectively compile the firmware again and again for each device I add or can I install the same .bin file on every device and then just give them different names in the dashboard? - this possibly ties in with question 1 since if the calibration is baked in to the firmware, they would all have to have different firmware.

You could put a filter in the home assistant entity so it doesn’t require re compiling esphome.

You can probably use, say, a number helper in ha, import the number into ha and use it in a lambda filter.

1 Like
  1. you need to make sure each device is distinct.
    You can do this by adding a dynamic value fr the mac address to the name.
    The example files for ESPHome contains this example.
    Sharing ESPHome devices — ESPHome
1 Like

Thanks Nick - am I correct in thinking that by putting a filter in the device yaml file, I am baking it in to the firmware?

Can you point me towards info on how to add a filter to an entity? - Looking at the device in the HA dashboard, I can click on the device and see “settings” and then I can get to “advanced settings” but that only seems to allow me to change the entity status.

Thanks Wally, that’s really useful - I will have a read. Assuming I can individually calibrate devices, this will be really helpful.

Yes

Templating

1 Like