OctoPrint-HomeAssistant icon indicating copy to clipboard operation
OctoPrint-HomeAssistant copied to clipboard

[Bug] pause switch does not resume print

Open manolitto opened this issue 2 years ago • 1 comments

Expected behaviour

Switching pause switch to off should actually resume the print in OctoPrint.

Observed behaviour

Switching pause switch to off has no effect.

What I found out

When the printer is in pause mode and when switching the pause switch in HA to off a MQTT message with payload "False" is sent to topic "octoPrint/hassControl/pause" which seems ok. However, it does NOT actually resume the print on OctoPrint side.

What DID work is sending an empty message to "octoPrint/hassControl/pause" - it successfully resumed my print.

manolitto avatar Aug 04 '22 16:08 manolitto

Thanks for the report, I'll take a look soon.

cmroche avatar Aug 06 '22 16:08 cmroche

Hi,

Did you find a way of resolving this? I'm building a WiFi filament sensor and can get it to pause, but not resume.

Thanks

nquick avatar Jan 25 '23 13:01 nquick

Hey, I made a PR fixing it, depending on the switch position, Lovelace will send True or False for the MQTT message/payload. If the switch is currently set to off and the user interacts with it, Lovelace will emit True via MQTT, and vice versa for the switch in the on position. Also, for button entities, Lovelace sends PRESS as the payload. What I did in #100 was check if the message is PRESS for the buttons. I have tested this and it does work with the latest Home Assistant and OctoPrint.

AlekEagle avatar May 19 '23 23:05 AlekEagle