I am going through my first steps in Home Assistant, please don’t kill me if this is trivial and has been asked a thousand times before - I probably didn’t know how to phrase my question.
I wrote a simple sensor definition to make up for the unusable current readings on my NOUS plugs:
sensor:
- platform: template
sensors:
dose_02_ladegerate_wz_current_calculated:
friendly_name: "D02WZ Ladegeräte Berechneter Strom"
unit_of_measurement: "A"
value_template: '{{ (states("sensor.dose_02_ladegerate_wz_power") |float / ( (0.001 |float + states("sensor.dose_02_ladegerate_wz_voltage") |float) ) ) | round(3) }}'
icon_template: "{{ 'mdi:current-ac' }}"
I do own 12 of these plugs - will I have to copy/paste this snippet 12 times with updated entity-names? Or is there a way to add this to the device definition so it gets created for every single device automatically i.e.
class myNOUSplug inherits from NOUSplug
or something like that?