Add the following to your HA configuration.yaml (replace '<IP-ZENDURE-P1>' with the IP of the P1 meter, can be found in Zendure APP => P1 meter => aparaat/device information). Save file, restart HA.
You will then be able to find a sensor with name like sensor.p1_zendure_api
- resource: http://<IP-ZENDURE-P1>/properties/report
scan_interval: 1
sensor:
- name: "P1 Zendure API"
unique_id: P1_Zendure_API
value_template: >
{% set power = value_json.total_power | float(0) %}
{{ power if -10000 < power < 10000 else 0 }}
unit_of_measurement: "W"
device_class: power
state_class: measurement