-
Please format pasted code correctly for the forum. It helps us help you.
-
Binary sensors only have the states
onandoff. Power is not a binary_sensor, it is a sensor. -
Heed the warning box here: https://www.home-assistant.io/docs/configuration/templating/
- You should use the new format for new sensors. Try this:
configuration.yaml
template:
- sensor:
- name: "Kogan Plug 06 Power" # or whatever you want to call it
unit_of_measurement: "W"
device_class: power
state_class: measurement # only include this line if you want long term statistics
state: "{{ state_attr('switch.kogan_smart_plug_06', 'current_consumption') }}"
- name: "Kogan Plug 07 Power" # or whatever you want to call it
unit_of_measurement: "W"
device_class: power
state_class: measurement # only include this line if you want long term statistics
state: "{{ state_attr('switch.kogan_smart_plug_07', 'current_consumption') }}"
- name: etc...
You can then add these entities to any dashboard card. See the right hand column here. History graph or Entities cards would be good choices.
