1. elgris
mkdir -p /config/custom_components/power
vi /config/sensors.yaml
///
- platform: command_line
scan_interval: 3
name: powerConsumption
unit_of_measurement: W
unique_id: 9002
command: "/config/custom_components/power/getpower C"
- platform: command_line
scan_interval: 3
name: powerMeter
unique_id: 9003
unit_of_measurement: W
command: "/config/custom_components/power/getpower M"
- platform: command_line
scan_interval: 3
name: powerProduction
unique_id: 9004
unit_of_measurement: W
command: "/config/custom_components/power/getpower P"
vi /config/custom_components/power/getpower
#!/bin/sh
curl -s "http://srv002.d01.net/rsolar/php/getpower.php?action=$1"