WTH Adding a spreadsheet to connect multiple attributes to a single selection

WTH Adding a spreadsheet to connect multiple attributes to a single selection.
Similar to vlookup when I select one entity or specifying something, I want to get different output from different activities without using multiple ifs - just put a spreadsheet that will enable to add attributes or just enable a selection (maybe a spreadsheet helper)

Do you have any example?

If multiple ifs compare the same variable with different values and always do similar thing then you can maybe use dict variable and do variable lookup from that?

Here is how I don’t check tariff with ifs but use a dict where all tariff names are listed with their respective values:

{% set transmission_cost = ({ 'Night-time': 0.0178, 'Top Weekend': 0.0178, 'Daytime': 0.0311, 'Top Daytime': 0.0311, 'unknown': 0.0 }) %}
{% set price = transmission_cost[states('sensor.tariff')] + …

Hi and thank you for the suggestion,
for sure there are very complex and code oriented solutions, the idea is to simplifiey this for simple users (like me :wink:) with a tabular option