Well you’re going to hate this result. If I remove the final filter (max) the result is an empty list []. Here’s the part you’re gonna hate, if I remove this line:
By marking petro’s solution to your second question, it unmarked the original solution to your first question. One thread topic cannot have more than one solution.
That means other people who read the first post in this thread, with your original question, will see the wrong solution:
ok only one more thing can i have two different map(attribute=‘attributes.current_power_w’ and ‘attributes.power’ because i have a switch different of the others?
i got this erros because that switch
Error rendering template: UndefinedError: ‘mappingproxy object’ has no attribute ‘current_power_w’
No, you can’t have more than one map attribute. There may be ways to do it, but it would be a pain in the ass. You may want to move to a python script instead of a template.