I have a smart plug coming, im planning to connect it to zigbee2mqtt.
I want to create a template which shows the used energy consumed in Euros. Reading a lot of topics…I should be able to get it done, but I’m not sure of a couple things.
-1ste I make a integration called utility_meter, on the entity of the smart plug, but which one? In the documentation I see two options.
Power, measurement in W
Energy, measurement in kWh
Think I need the"energy"?
2th the integration makes a new sensor, this is the sensor that I need for the template I guess?
3th I have to created a whole new “sensor template” whit the entity of the sensor that the utility_maker created?
The code that I need to change the output from W or kWh to euro… it’s all abba kadabra for me .
Do I miss something? Any feedback is appreciated
Link for documentation
Thank you again, that Jinja code is what I need , I saw something about “round 2” inside the Jinja code, as far I understand… That is for the decimals?
Is it still needed for the “mode box”? I have a fixed energy plan for years so I guess I won’t need to update it a lot.
For the template, when I add more… For example monthly, I don’t need to start on a new line right? I can start monthly_energy_cost: under the last line?
When the template is done, I can select it as a sensor in UI as a sensor card to show up
Sorry for all this questions, but I want to be prepared… Because of my work, I only have the weekends to short and try this things out.
is your visual studio code setup to detect errors properly? Personally, I wouldn’t rely on it. That’s what config checker is for. Check your config and see if there’s errors.
Also, when you reply to a person, use the reply on the persons post, not the blue button at the bottom of the topic. Thanks.
Controleer je configuratie als je onlangs wijzigingen hebt aangebracht en zeker wilt weten dat ze geldig zijn
Ongeldige configuratie
CONTROLEER CONFIGURATIE
Invalid config for [binary_sensor.template]: [unit_of_measurement] is an invalid option for [binary_sensor.template]. Check: binary_sensor.template->sensors->daily_energy_cost->unit_of_measurement. (See ?, line ?).
oke, i understand that. my English understanding is better than I can wight it LoL…sorry.
but what’s wrong, I have copied the code that I get from Tom, and replace the stuff that I needed.
in some other topics I saw the same type of measurements put in?