I have a power socket switch which can measure the power consumption. Based on this sensor, I would like to have a card which displays if a device is running or not. How can this be done?
Does the device use a consistent or predictable amount of power?
If so a template sensor should be able to use the power consumption sensor and output on/off based on a predefined limit of power usage.
ie if the power consumption is above 10 watts then on else off.
It’s a Air-Conditioner and if there’s no value in HA at all, it’s powered off, so everything above 0 would mean it’s turned on.
There is no parasitic draw at all? Most electronic devices use a watt or two even when ‘powered off’ as they are in a standby mode that still uses a bit. May be safer to use a minimum of 10 watts or so to just avoid this. An air conditioner is sure to use more than 10 watts when running, likely hundred or thousands depending on size.