Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix rest_command when server is unreachable #26948
When a server doesn't exist, the connection fails immediately, rather
By using the command_config, we avoid using the potentially unassigned
This patch makes scripts work that have a rest_command in them which
I'm using a rest_command to switch off one specific lamp in the middle of a "go to bed" script. When that lamp is offline, the rest_command fails and the remainder of my script never executes (some lights stay on).
Example entry for
When a server doesn't exist, the connection fails immediately, rather than waiting for a timeout. This means that the async handler is never reached, and the request variable never filled, yet it's used in the client error exception handler, so this one bugs out. By using the command_config, we avoid using the potentially unassigned request variable, avoiding this problem. This patch makes scripts work that have a rest_command in them which fails due to a server being offline.
Could someone please point me to how this should be formatted? For all I can't tell, it's consistent with other usages, and I can't find docs that tell me how to do it otherwise.
Also, I've fixed the cla-error by adding my other email address to githut, yet the label is still assigned.
I guess at this point I need human interaction. :) @homeassistant
@sebasje CLA looks good now
About formatting, we use a tool called
The nice thing about this, it that you as a developer don't have to worry about formatting.