Commits
Click on a commit to change the comparison rangeFix numeric-only hostnames being misinterpreted as IP addresses
When a hostname like "1234.local" has its .local suffix stripped for
the getaddrinfo fallback, the resulting "1234" string gets interpreted
by socket.getaddrinfo() as a decimal IP address (0.0.4.210 in this case).
This caused OTA uploads to fail for devices with numeric-only names,
as the connection would be attempted to the wrong IP address.
The fix skips the stripped-hostname fallback when the hostname consists
only of digits, as these will always be misinterpreted as IP addresses.
Fixes esphome/esphome#12143
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>2 days ago
by swoboda1337