How to add template / confusion

i need to apply a fix as a template

specifically its Home Assistant Template Sensor - Shenzhen Neo NAS-WR01ZE Reported kWh Energy Correction · GitHub

but i have no idea how to do that? Do i have to create separate yaml file under config/ or do i have to add code into configuration.yaml?


That can be added directly to configuration.yaml, replacing sensor.my_device_power_electric_consumption_kwh with your sensor entity.

Then run a command line config check:

ha core check

Before restarting HA

@Tinkerer its zwave device, its not inside configuration.yaml

The template is pasted into your configuration.yaml. And you replace the entity_id in the template with your zwave entity_id. That’s what tinkerer is saying.

@petro okay, i will try, there is no separate file like template.yaml or dir for that? thx

that depends on how you set up your system. If you don’t know, then you’ll just be putting that in configuration.yaml

but i am afraid it does not work…

i added

but i cant see / find Entity like that here >

its not even here…

you have to restart…

well i did hm. i can do it again… but i did via ssh. reboot.

You don’t need to reboot, just restart home assistant. Make sure config check works.

not sure what does it mean to restart homeassistant,

but i now clicked on Restart Supervisor and its there.

But i don’t think it is working properly?

seems like pretty mess… in configuration its called
{% set value = states(‘sensor.wall_plug_switch_power_electric_consumption_kwh’) | float(‘unknown’) %}

in UI its sensor.usb_qc_charger_

Restart supervisor restarts the supervisor, not home assistant. You’d need to restart home assistant.

Configuration → Settings → Server Control tab → Restart

This creates a new entity that uses the other entity. You will have 2. It does not replace your existing entity.

seems broken even after restart…


even configuration.yaml

it says Unknown in status… so no clue.

you didn’t use the correct entity_id. You’re image shows the word power in your template, where your entity_id on the other image does not have that word.

@petro ah now i got it … see your point … i will correct. Appreciate your help.

1 Like

I suggest you move to some other type of editing. Via SSH is a pita. You can setup samba share to access the files from another machine or use the Visual Studio Code addon.