Thanks Habbie.
Anyway, here’s my config which also exports the power consumption and enables the Vindriktning to be shown properly in the Energy Monitoring:
uart:
rx_pin: D2
baud_rate: 9600
sensor:
- platform: pm1006
pm_2_5:
name: "$friendly_name"
accuracy_decimals: 2
filters:
- sliding_window_moving_average:
window_size: 50
send_every: 10
send_first_at: 10
- platform: template
name: "$friendly_name - Power Usage"
id: power_consumption
device_class: power
state_class: measurement
unit_of_measurement: W
accuracy_decimals: 4
filters:
- heartbeat: 60s
- platform: integration
name: "$friendly_name - Consumed Energy"
sensor: power_consumption
time_unit: 'h'
device_class: energy
state_class: total_increasing
unit_of_measurement: 'Wh'
restore: false
integration_method: left
interval:
- interval: 1min
then:
- sensor.template.publish:
id: power_consumption
state: 0.5696
The power consumption is what I measured earlier plus 10% inefficiencies for the power supply.