CUPS status trigger


I’ve just managed to set up CUPS integration, and while I can trigger on ink levels, I can’t trigger on state.

I would like to create an automation like “If there’s a document in the CUPS queue (i.e. the queue has status ‘printing’ turn on the Z-Wave socket for the printer if it’s not already on. If the CUPS queue is in state ‘idle’ for longer than 30 minutes, turn of the Z-Wave socket for the printer if it is on”, so triggering on state is the missing bit.

Should be quick to integrate, but I’d need to have a much closer look to write a PR myself. If anyone else could do so quick, I’d be much obligated!

Thanks for all the great work put into this project already, I’m really enjoying it!

All the best from Berlin,


Can you show a screen shot of the CUPS sensor(s) in Developer Tools → States (including the right hand attributes column).

showing both states :slight_smile: … the german “state_message” is essentially saying “printer not found”, because it’s not on the network while it’s off.

the state changes do show up in the logbook.

thanks for the help :slight_smile:

Why can’t you trigger on the sate?

  - platform: state
    entity_id: sensor.hp_color_laserjet...etc
    from: idle
    to: printing

mainly because I was too blind to find that option in the visual editor. DUH.

fixed, it’s working now … as expected … heh.

thanks for the additional set of eyes :smiley: