Newer
Older
homeassistant_config / template / opvaskemaskine.yaml
- sensor:
    - name: Opvaskemaskine Spænding
      state: '{{ (states.switch.opvaskemaskine_switch.attributes.voltage) | default(0)| float }}'
      unit_of_measurement: "V"
      device_class: voltage
    
    - name: Opvaskemaskine Strøm
      state: '{{ (states.switch.opvaskemaskine_switch.attributes.current) | default(0)| float * 0.001 }}'
      unit_of_measurement: "A"
      device_class: current
    
    - name: Opvaskemaskine Energi
      state: '{{ (states.switch.opvaskemaskine_switch.attributes.current_consumption) | default(0)| float }}'
      unit_of_measurement: "W"
      device_class: power