sleevezipper / hass-workstation-service

Provide useful sensors and services from your workstation to Home Assistant.
Apache License 2.0
613 stars 54 forks source link

Custom command issue #108

Open Slejpnir opened 2 years ago

Slejpnir commented 2 years ago

Hello, I am using custom commands to change the audiodevice with nircmd program. Everything works fine just after the commands are created. But after a while one or both of the commands stop working. Any suggestions? Thanks in advance for any help.

sleevezipper commented 2 years ago

Hi!

Does this issue help you?

Slejpnir commented 2 years ago

This issue looks very similar but I have the latest version of HA and it doesn't help.

Kpapadak1 commented 2 years ago

I have the same issue with a Custom Command that locks screen. It worked for days and 2 days ago just stopped. I can not explain why since the command still works in windows. After removing the command and readding it exactly the same it now works but I can not explain why it broke in the first place.

Command used: Rundll32.exe user32.dll,LockWorkStation

sleevezipper commented 2 years ago

That's super annoying. And also a nightmare to debug. I'll take a look later. Thanks for reporting!

VNRARA commented 2 years ago

Superannoying bug! I have the same thing happing: testing works, mqtt explorer shows messages being sent, but HWS isn't firing the command. (Testing does work tho).

LTTS1991 commented 2 years ago

log20220118_001.txt log20220118.txt

Logger: homeassistant.helpers.service
Source: helpers/service.py:129
First occurred: 12:48:22 (14 occurrences)
Last logged: 12:48:27

Unable to find referenced entities switch.splitdisplaymode
Unable to find referenced entities switch.normaldisplaymode

@sleevezipper do these logs help?

Suddenly the commands weren't working and after removing all files in C:\Users\LNDN\AppData\Local\Apps\2.0 and reinstalling and using mqtt explorer to remove all mqtt msg's; the commands worked again.

richcoliver commented 2 years ago

Just wondering if there is a fix yet or maybe even a work around as it has done this to me 3 days in a row now. The first one in the Commands list works but the 2nd stops working until I remove and re-add. Thankfully I don't seem to get an orphaned entity everytime I have done this. :-)