Last active
September 17, 2025 08:56
-
-
Save korteke/037db1a7f99c4591b47d423f235fd869 to your computer and use it in GitHub Desktop.
Cozify HAN-port meter + Home Assistant integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default_config: | |
| homeassistant: | |
| packages: !include_dir_named packages | |
| frontend: | |
| themes: !include_dir_merge_named themes | |
| extra_module_url: | |
| - /hacsfiles/custom-sidebar/custom-sidebar-yaml.js | |
| automation: !include automations.yaml | |
| script: !include scripts.yaml | |
| scene: !include scenes.yaml | |
| sensor: !include sensor.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - platform: rest | |
| resource: http://COZIZY-IP-ADDRESS/meter | |
| name: "Cozify HAN Total Power Imported" | |
| unique_id: cozify_han_ic | |
| device_class: energy | |
| state_class: total_increasing | |
| value_template: "{{ value_json.ic | float(0) }}" | |
| unit_of_measurement: "kWh" | |
| - platform: rest | |
| resource: http://COZIZY-IP-ADDRESS/meter | |
| scan_interval: 5 | |
| method: GET | |
| headers: | |
| User-Agent: Home Assistant | |
| Content-Type: application/json | |
| json_attributes: | |
| - ic | |
| - ec | |
| - ric | |
| - rec | |
| - p | |
| - u | |
| - i | |
| - r | |
| value_template: "OK" | |
| name: "Cozify HAN Data" | |
| unique_id: cozify_han_data | |
| - platform: template | |
| sensors: | |
| cozify_han_total_power_imported: | |
| friendly_name: "Cozify HAN Total Power Imported" | |
| unique_id: cozify_han_ic | |
| device_class: energy | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.ic | float(0) }}" | |
| unit_of_measurement: "kWh" | |
| cozify_han_total_power_exported: | |
| friendly_name: "Cozify HAN Total Power Exported" | |
| unique_id: cozify_han_ec | |
| device_class: energy | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.ec | float(0) }}" | |
| unit_of_measurement: "kWh" | |
| cozify_han_ric: | |
| friendly_name: "Cozify HAN Reactive Energy Imported" | |
| unique_id: cozify_han_ric | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.ric | float(0) }}" | |
| unit_of_measurement: "kVArh" | |
| cozify_han_rec: | |
| friendly_name: "Cozify HAN Reactive Energy Exported" | |
| unique_id: cozify_han_rec | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.rec | float(0) }}" | |
| unit_of_measurement: "kVArh" | |
| cozify_han_power_total: | |
| friendly_name: "Cozify HAN Power Total" | |
| unique_id: cozify_han_power_total | |
| device_class: power | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.p[0] | float(0) if states.sensor.cozify_han_data.attributes.p is iterable else 0 }}" | |
| unit_of_measurement: "W" | |
| cozify_han_power_l1: | |
| friendly_name: "Cozify HAN Power L1" | |
| unique_id: cozify_han_power1 | |
| device_class: power | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.p[1] | float(0) if states.sensor.cozify_han_data.attributes.p is iterable else 0 }}" | |
| unit_of_measurement: "W" | |
| cozify_han_power_l2: | |
| friendly_name: "Cozify HAN Power L2" | |
| unique_id: cozify_han_power2 | |
| device_class: power | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.p[2] | float(0) if states.sensor.cozify_han_data.attributes.p is iterable else 0 }}" | |
| unit_of_measurement: "W" | |
| cozify_han_power_l3: | |
| friendly_name: "Cozify HAN Power L3" | |
| unique_id: cozify_han_power3 | |
| device_class: power | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.p[3] | float(0) if states.sensor.cozify_han_data.attributes.p is iterable else 0 }}" | |
| unit_of_measurement: "W" | |
| cozify_han_r_power_total: | |
| friendly_name: "Cozify HAN Reactive Power Total" | |
| unique_id: cozify_han_r_power_total | |
| device_class: power | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.r[0] | float(0) if states.sensor.cozify_han_data.attributes.r is iterable else 0 }}" | |
| unit_of_measurement: "VAr" | |
| cozify_han_r1: | |
| friendly_name: "Cozify HAN Reactive Power L1" | |
| unique_id: cozify_han_r1 | |
| device_class: power | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.r[1] | float(0) if states.sensor.cozify_han_data.attributes.r is iterable else 0 }}" | |
| unit_of_measurement: "VAr" | |
| cozify_han_r2: | |
| friendly_name: "Cozify HAN Reactive Power L2" | |
| unique_id: cozify_han_r2 | |
| device_class: power | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.r[2] | float(0) if states.sensor.cozify_han_data.attributes.r is iterable else 0 }}" | |
| unit_of_measurement: "VAr" | |
| cozify_han_r3: | |
| friendly_name: "Cozify HAN Reactive Power L3" | |
| unique_id: cozify_han_r3 | |
| device_class: power | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.r[3] | float(0) if states.sensor.cozify_han_data.attributes.r is iterable else 0 }}" | |
| unit_of_measurement: "VAr" | |
| cozify_han_v1: | |
| friendly_name: "Cozify HAN Voltage L1" | |
| unique_id: cozify_han_voltage1 | |
| device_class: voltage | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.u[0] | float(0) if states.sensor.cozify_han_data.attributes.u is iterable else 0 }}" | |
| unit_of_measurement: "V" | |
| cozify_han_v2: | |
| friendly_name: "Cozify HAN Voltage L2" | |
| unique_id: cozify_han_voltage2 | |
| device_class: voltage | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.u[1] | float(0) if states.sensor.cozify_han_data.attributes.u is iterable else 0 }}" | |
| unit_of_measurement: "V" | |
| cozify_han_v1: | |
| friendly_name: "Cozify HAN Voltage L3" | |
| unique_id: cozify_han_voltage3 | |
| device_class: voltage | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.u[2] | float(0) if states.sensor.cozify_han_data.attributes.u is iterable else 0 }}" | |
| unit_of_measurement: "V" | |
| cozify_han_c1: | |
| friendly_name: "Cozify HAN Current L1" | |
| unique_id: cozify_han_current1 | |
| device_class: current | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.i[0] | float(0) if states.sensor.cozify_han_data.attributes.i is iterable else 0 }}" | |
| unit_of_measurement: "A" | |
| cozify_han_c2: | |
| friendly_name: "Cozify HAN Current L2" | |
| unique_id: cozify_han_current2 | |
| device_class: current | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.i[1] | float(0) if states.sensor.cozify_han_data.attributes.i is iterable else 0 }}" | |
| unit_of_measurement: "A" | |
| cozify_han_c3: | |
| friendly_name: "Cozify HAN Current L3" | |
| unique_id: cozify_han_current3 | |
| device_class: current | |
| value_template: "{{ states.sensor.cozify_han_data.attributes.i[2] | float(0) if states.sensor.cozify_han_data.attributes.i is iterable else 0 }}" | |
| unit_of_measurement: "A" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment