Hey everyone! I wanted to share my experience with a Shell Command Switch issue I recently encountered. I set up a switch using Home Assistant to ping my TV and check if it’s on or off. When the TV was on, everything worked perfectly, but when it was off, I kept getting error messages in the logs. Specifically, the curl command was failing because the device wasn’t reachable. I was a bit puzzled about how to handle this gracefully without the errors flooding my logs.
After some research, I found a solution that involved modifying the curl command to return a specific value when the device is offline, like ‘timeout’ or ‘0’, instead of failing. This way, the switch can still function correctly without generating errors. I thought this was a neat workaround and wanted to share it in case anyone else is facing a similar issue.
If anyone has other tips or alternative solutions, I’d love to hear them! It’s always great to learn from the community and find new ways to optimize our setups.