Hi, I am trying to set up a switch that only shows that it is on when there is current draw. I am trying to use a template, but the switch is showing as being off even when there is current draw. Here is my code:
This will only show as off when the current is actually 0.
One final method for exactly zero:
value_template: "{{ not is_state('sensor.attic_fan_current', '0.00') }}"
Note however that you must match exactly the number of decimals shown for the sensor in Developer Tools β States when the sensor is zero. All states are strings and the string β0.00β does not equal the string β0β.