Sensor state as a seperate sensor?

Hello there. Hopefully I can explain this properly, and I’m sorry if I’m unclear.
I want to make a sensor, that is either On or Off depending on another sensor numeric value - in my case if my PC switch wattage sensor is above 20W (meaning the PC is on), then the new sensor would show as on. Anything below that would show PC as off.

condition: numeric_state
entity_id: sensor.pc_switch_wattage
above: 20

Essentialy, turning the above code into sensor.pc_status or something similar, to know if PC is on or not, and have fewer lines of code in automations, as well as simple way to check if PC is on, instead of looking at the sensor.pc_switch_wattage value :slight_smile:
Any help is very much appreciated, thanks!

Template Binary Sensor: Template - Home Assistant

As state you use a template with the condition you mentioned.

  - binary_sensor:
      - name: "PC Running"
        state: "{{ states('sensor.pc_switch_wattage')|float(0) > 20 }}"
        availability: "{{ states('sensor.pc_switch_wattage')|is_number }}"
        icon: "mdi:desktop-classic"

Thank you both for your responses! That was the solution, I thought it had to be sensor not binary_sensor, and I couldn’t figure it out… thanks again!