Some additional Info. This is the debug output in Node Red.
12.8.2021, 12:34:54[node: Stromverbrauch](http://ha.derfisch.zuhause:8123/api/hassio_ingress/wQNuZ-q3lFUYZkg3eicz0Im-LpYH4gfZbh-N1btx4ZU/#)
msg :
object
type: "nodered/entity"
server_id: "5d97109.d1423f"
node_id: "26f534a3.dbe4a4"
state: 561
attributes: object
state_class: "measurement"
last_reset: "2021-01-07T08:08:02+00:00"
id: 21
And this is the flow:
[{"id":"a1099869.4fa8","type":"tab","label":"Discovergy","disabled":false,"info":""},{"id":"f179085a.a97cb","type":"inject","z":"a1099869.4fa8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":80,"wires":[["d6489de8.e17808"]]},{"id":"d6489de8.e17808","type":"Discovergy Meter","z":"a1099869.4fa8","name":"Discovergy","account":"XXXXX","meterId":"XXXXXX","firstReading":0,"firstReadingOut":0,"firstReadingDate":"","isProduction":false,"revenue":0,"amortization":0,"prodMeterId":"XXXXX","firstReadingProd":0,"x":370,"y":80,"wires":[["26f534a3.dbe4a4"]]},{"id":"26f534a3.dbe4a4","type":"ha-entity","z":"a1099869.4fa8","name":"Stromverbrauch","server":"5d97109.d1423f","version":1,"debugenabled":true,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Stromverbrauch"},{"property":"device_class","value":"energy"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"kwh"}],"state":"payload.latest.power_w","stateType":"msg","attributes":[{"property":"state_class","value":"measurement","valueType":"str"},{"property":"last_reset","value":"2021-01-07T08:08:02+00:00","valueType":"str"}],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":680,"y":80,"wires":[[]]},{"id":"78286c6c.3d2c84","type":"discovergy-config","name":"Disco1"},{"id":"5d97109.d1423f","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]