We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09f2e3d commit ba94d19Copy full SHA for ba94d19
solar_router/power_meter_fronius.yaml
@@ -39,10 +39,17 @@ script:
39
then:
40
- http_request.get:
41
url: http://${power_meter_ip_address}/solar_api/v1/GetMeterRealtimeData.cgi
42
+ headers:
43
+ Content-Type: application/json
44
capture_response: true
45
max_response_buffer_size: 4096
46
on_response:
47
48
+ - logger.log:
49
+ format: 'Response status: %d, Duration: %u ms'
50
+ args:
51
+ - response->status_code
52
+ - response->duration_ms
53
- lambda: |-
54
json::parse_json(body, [](JsonObject root) -> bool {
55
id(real_power).publish_state(root["Body"]["Data"]["0"]["PowerReal_P_Sum"].as< float >());
0 commit comments