Offsetting barometric pressure for location / altitude

Hello community. My first post and query. I have an Aqara temperature / humidity / barometric pressure sensor operating via ZHA and I want to offset the pressure for altitude. I’ve read posts such as How can I get my Aqara Temperature / Humidity sensor to read the barometric pressure? but I can’t figure out if I should substitute the template or add it to the existing yaml config. My current syntax for the Aqara sensor is this:

  • type: entities
    entities:
    - entity: sensor.lumi_barometric_pressure_pressure
    name: Pressure
    - entity: sensor.lumi_barometric_pressure_temperature
    name: Temperature
    - entity: sensor.lumi_barometric_pressure_humidity
    name: Humidity
    - entity: sensor.lumi_barometric_pressure_battery
    name: Battery
    title: Shed
    state_color: true

Could anyone help to get the right syntax? Thanks

+1 for this, came here looking to do exactly the same thing

It would be really handy to be able to pull the altitude from the “Home” zone location and apply this automatically (or optionally, if the reporting device applies it itself) to pressure sensors