Home assistant uses some weird “code in YAML” syntax. Chances are, the author could have written a virtual binary sensor by making one that turns on off according to the meter. I found that chatGPT makes writing these yaml files significantly better and faster.