# share from  Walter Curl 

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# configuration.yaml mqtt demo code:
# Demo SN   ############   {Display the SN code in the device list.}

#If the Circuit Editor -> circuitX -> Multiplier has been modified, then multiply the coefficients of the power and voltage of the corresponding circuit by the corresponding coefficients, while keeping the current unchanged.
#For example : The voltage multiplier is set to 2.   
#value_template: "{{ value_json.sense[17][0] | float | multiply(0.1) }}"   ->  value_template: "{{ value_json.sense[17][0] | float | multiply(0.2) }}"


mqtt:
  sensor:
    - name: "MAIN current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[16][1] | float | multiply(0.01) +  value_json.sense[17][1] | float | multiply(0.01) + value_json.sense[18][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"
      
    - name: "MAIN power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ ( (value_json.sense[17][2] | float) + (value_json.sense[18][2] | float)) / 100000.00}}"
      unit_of_measurement: "kW"
      icon: "mdi:power-plug"

    - name: "MAIN energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[16][3] | float | multiply(0.001) + value_json.sense[17][3] | float | multiply(0.001) +value_json.sense[18][3] | float | multiply(0.001)}}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "MAIN energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[16][4] | float | multiply(0.001) +value_json.sense[17][4] | float | multiply(0.001) + value_json.sense[17][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "B channel voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[17][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "B channel current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[17][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "B channel power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[17][2] | float | multiply(0.01) }}"
      unit_of_measurement: "W"
      icon: "mdi:power-plug"

    - name: "B channel energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[17][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "B channel energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[17][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "C channel voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[18][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "C channel current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[18][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "C channel power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[18][2] | float | multiply(0.01) }}"
      unit_of_measurement: "W"
      icon: "mdi:power-plug"

    - name: "C channel energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[18][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "C channel energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[18][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Heat voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[0][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Heat current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[0][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"

      # change this to 0.00001 for a single pole breaker this is a Double pole breaker
    - name: "Heat power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[0][2] | float | multiply(0.00002) | round(3)}}"
      unit_of_measurement: KW"
      icon: "mdi:power-plug"

    - name: "Heat energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[0][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Heat energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[0][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Dryer voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[1][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Dryer current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[1][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Dryer power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[1][2] | float | multiply(0.00002) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Dryer energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[1][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Dryer energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[1][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "NA1 voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[2][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "NA1 current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[2][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "NA1 power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[2][2] | float | multiply(0.00001) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "NA1 energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[2][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "NA1 energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[2][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "NA2 voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[3][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "NA2 current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[3][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "NA2 power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[3][2] | float | multiply(0.00001) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "NA2 energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[3][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "NA2 energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[3][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Network voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[4][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Network current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[4][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Network power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[4][2] | float | multiply(0.00001) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Network energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[4][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Network energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[4][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "A/C voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[5][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "A/C current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[5][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "A/C power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[5][2] | float | multiply(0.00002) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "A/C energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[5][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "A/C energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[5][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Shop voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[6][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Shop current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[6][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Shop power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[6][2] | float | multiply(0.00002) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Shop energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[6][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Shop energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[6][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Hot Water 1 voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[7][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Hot Water 1 current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[7][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Hot Water 1 power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[7][2] | float | multiply(0.00002) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Hot Water 1 energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[7][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Hot Water 1 energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[7][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Hot Water 2 voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[8][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Hot Water 2 current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[8][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Hot Water 2 power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[8][2] | float | multiply(0.00002) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Hot Water 2 energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[8][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Hot Water 2 energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[8][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Hot Water 3 voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[9][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Hot Water 3 current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[9][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Hot Water 3 power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[9][2] | float | multiply(0.00002) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Hot Water 3 energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[9][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Hot Water 3 energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[9][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Living Rm & Garage Lights and Plugs voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[10][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Living Rm & Garage Lights and Plugs current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[10][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Living Rm & Garage Lights and Plugs power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[10][2] | float | multiply(0.00001) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Living Rm & Garage Lights and Plugs energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[10][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Living Rm & GarageLights and Plugs energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[10][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Lights and plugs voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[11][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Lights and plugs current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[11][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Lights and plugs power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[11][2] | float | multiply(0.00001) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Lights and plugs energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[11][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Lights and plugs energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[11][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Master Bedroom voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[12][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Master Bedroom current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[12][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Master Bedroom power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[12][2] | float | multiply(0.00001) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Master Bedroom energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[12][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Master Bedroom energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[12][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Range voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[13][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Range current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[13][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Range power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[13][2] | float | multiply(0.00002) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Range energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[13][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Range energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[13][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "Lights voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[14][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "Lights current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[14][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "Lights power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[14][2] | float | multiply(0.00001) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "Lights energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[14][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "Lights energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[14][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing


    - name: "16 channel voltage"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[15][0] | float | multiply(0.1) }}"
      unit_of_measurement: "V"
      icon: "mdi:flash"
      
    - name: "16 channel current"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[15][1] | float | multiply(0.01) }}"
      unit_of_measurement: "A"
      icon: "mdi:current-ac"


    - name: "16 channel active power"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[15][2] | float | multiply(0.00001) | round(3)}}"
      unit_of_measurement: "KW"
      icon: "mdi:power-plug"

    - name: "16 channel energyIn"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[15][3] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing

    - name: "16 channel energyOut"
      state_topic: "SEMMETER/############/HA"
      value_template: "{{ value_json.sense[15][4] | float | multiply(0.001) }}"
      unit_of_measurement: "kWh"
      icon: "mdi:counter"
      device_class: energy
      state_class: total_increasing




automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


recorder:
  commit_interval: 300
  include:
    domains:
      - switch
      - light
      - cover
      - climate
      - sensor
      - binary_sensor
      - button
