Smappee Homeassistant

Smappee is a small power meter from Belgium that can be used to monitor the power and the cos phi of an electrical installation, thanks to clamp on the main power line (for the current measurement) and to a normal socket (for the tension). The device is bundled with a web app (that is quite slow) and a cloud API (with credential -on demand (!) -) but there is a local REST-ish API one can use from HomeAssistant using the REST sensor API.

Here is the snippet I am using:

sensor:
  - platform: rest
    resource: http://smappee.home/gateway/apipublic/instantaneous
    name: SmappeeElec
    payload: "loadInstantaneous"
    method: POST
    value_template: '{{ value_json[1].value | multiply(0.001) | round(2) }}'
    unit_of_measurement: W

Result is good enough for plotting historical charts : Smapppe Homeassistant sensor graph