I have introduced a new Athom Smart Plug V2 with a table lamp plugged in. The lamp has a 3.5W LED bulb and I’m trying to determine when the lamp is on and when it is off.
The plug is connected to HA, however I see no change on the Current or Power values when the lamp is on or off, it continues to report 0.00000:
‘Living Room Lamp Current’: Sending state 0.00000 A with 2 decimals of accuracy
‘Living Room Lamp Power’: Sending state 0.00000 W with 1 decimals of accuracy
I would expect the current to read around (3.5/240) = 0.0145 A and the power to read around 3.5 W while the lamp is on. [UK, so 240V]
Any pointers as to how to address? Is this a config issue?
Under the sensor portion of the YAML (which you didn’t paste), edit the lambda to read like I pasted above. Then compile and install the changes onto the Athom.
OK, but FYI - what I pasted was the full extent of the yaml in ESPHome for the plug, there is nothing else to edit.
Are you saying I need to copy and paste the rest of the stuff in the github page you linked to?
UPDATE:
Did copy the full yaml from that github page into ESPHome for the plug, edited as required and hey presto, seems to be working now. I get power and current with the figures reduced.
The default Athom config points at their remote config on GitHub so that they can make firmware changes and you get the updates. So the default config doesn’t have much in there, it mostly links to another source.
To customise and take control of the config, I usually do exactly what you did. Copy/paste it locally. I think there’s other ways to just merge in and override parts though.
A common thing I implement is “auto off after x time”. My exhaust fan, hot glue gun, coffee machine, some dumb lights.
There is BL0937 energy meter chip in the plug. The datasheet specification says RMS current measurement accuracy is 0.3% typical. The input range of the current measurement sigma-delta ADC is ±50mV peak. 0.3% of it is 150uV that is very low voltage and it would need exra care to garantee this in the crammed room inside the plug.
If the maximum current is 16A, 0.3% presents 48mA, it ishard to expect better accuracy.