Mapping a table based on 2 lookup values

I’m trying to develop a sensor template which looks up values based on 2 inputs from a table. The lookup on Temperature to be based on the outside temperature sensor. The lookup on Power needs to be based on some interpolation between the nearest values in the table.

For example:

  • It’s 10 degrees outside.
  • The power used is 1.25kW
  • The value returned must be interpolated between the 5,47 and 3,52

I’ve tried mapper but I only get get it to map on a key:value pair. I would need to look up the value based on both temperature and power.

Thanks for any pointers.