Internet Printing Protocol (IPP) sensor ON/OFF

Hi!
Can I create a sensor that gives me this information?
Currently the IPP sensor gives me these states:

  • Unavailable
  • Idle
  • Printing

How can I create a new sensor that only tells me when the printer is ON or OFF?
Thanks

IPP (the protocol) assumes a printer is ON.
If the sensor show “unavailable”, you can assume the printer is OFF.

I solved this by creating a new template sensor, it works perfectly👍🏻

 - platform: template
    sensors:
      sensore_stampante:
        friendly_name: Stampante Epson
        value_template: "{% if is_state('sensor.epson_xp_4100_series', 'idle') %}Accesa{% else %}Spenta{% endif %}"
        

" Printing" also means your printer is ON, obviously.