but how do I get aenergy total and ret_aenergy total? everything I tried doesn’t work.
Note: I tried the Shelly integration but it polls every 5 minutes, I added a script to the PM mini and it polls every second on MQTT. Tried, but could not find a way to increase the polling frequency in the integration.
OMG, thank you so much. Worked perfectly and I learned a little more. So simple when you know. And I had never used the editor before, so trying it now.
Sometimes the dictionary’s key name is the same name as a built-in dictionary method.
Let’s say we have the following dictionary:
{
"id": 0,
"foo": {
"total": 10,
"values": 42
}
}
It has a key named values but there’s a dictionary method named values. In that case, you cannot use “dot” notation to reference it (because it will get confused and think you’re trying to use the valuesmethod).
{{ value_json.foo.values }} <-- Invalid
You have to use “bracket” notation. Here’s a mix of dot and bracket notation.
Please consider marking my post above with the Solutions tag. It will automatically place a check-mark next to the topic’s title indicating this topic has been solved. This helps users find answers to similar questions.