One of the most useful sensors on my Home Assistant dashboard is the power meter consumption that show me (nearly) “realtime” how much power I’m currently using.
There are a lot of hardware options to pull energy data on Home Assistant; since my home plant is based on Bticino Living Now, I’ve choose the F20T60A DIN power consumption module.

It allows to measure the electrical energy consumption of the entire single-phase system of the house… A toroid is supplied to measure the input current. Power supply 100-240 Va.c.. DIN module
https://catalogue.bticino.com/BTI-F20T60A-EN

As a DIN module, it must be installed on your electrical cabinet rail. The connection requires just to feed F and N to the module and put the clamp on the main phase (L) cable coming into your main breaker. Pay attention to the Toroid probe direction as stated in the label on it.

F20T60A it’s a Zigbee module, it can works with the default Bticino App (MyHome) or directly with your Zigbee Coordinator. I’m using this second option with a Conbee 2 USB and Zigbee2MQTT Integration. Full details on Zigbee2MQTT documentation for F20T60A
The module can be added to HA like any other Zigbee devices: go to Zigbee2mqtt Integration control panel, click PERMIT JOIN and wait some seconds, it will join automatically.
At the beginning F20T60A will show a RED led, in means the device is operational but not yet paired to the Gateway or Coordinator. Once Connected it became GREEN for some seconds, and than turn off permanently.

Once paired the device shows the Power (Watts) but the values is not automatically updated, you need to manually refresh the readings from Zigbee2mqtt – F20T60A – Exposes tab – Power value.

I’ve created an automation to publish an MQTT request each 10 second and automatically update the power readings from the module.
alias: F20T60A
trigger:
- platform: time_pattern
seconds: /10
action:
- service: mqtt.publish
data:
topic: zigbee2mqtt/F20T60A/get
payload: '{"power":""}'
And also added two sensors to my configuration.yaml file:
- “F20T60A Kw” used just to convert W to Kw
- “F20T60A Kw” used to calculate kWh from W. This sensor is needed to show the power readings in the Home Assistant Energy Dashboard.
sensor:
- platform: template
sensors:
f20t60a_kw:
friendly_name: "F20T60A Kw"
unit_of_measurement: "kW"
value_template: "{{ states('sensor.f20t60a_power') | float * 0.001 }}"
- platform: integration
source: sensor.f20t60a_power
name: c
unit_prefix: k
round: 2
unit: kWh
method: left
Go to Configuration -> Dashboards click on the one called “Energy“, click on ADD CONSUMPTION and select the kWh sensor.

Now wait same time (up 2 hours according to official documentation) and your Energy dashboard will starts to show the consumption.

I’ve created also a Gauge card for “realtime” consumption on my wall tablet dashboard

Finally an automation to notify me on my mobile and trought Alexa TTS that the maximum power consumption threshold has been exceeded for more than 2 minutes:
alias: Soglia Consumi
description: ''
trigger:
- type: power
platform: device
device_id: 1821186dc3de1806979512f2349dfffe
entity_id: sensor.f20t60a_power
domain: sensor
above: 3300
for:
hours: 0
minutes: 2
seconds: 0
condition: []
action:
- service: notify.mobile_app_sm_a525f
data:
message: Attenzione soglia consumi superata!
- service: notify.alexa_media_alexa_cucina
data:
message: Attenzione soglia consumi superata!
data:
type: tts
mode: single
Following the material used: