openlumi / homeassistant_on_openwrt

Install Home Assistant on your OpenWrt device with a single command
MIT License
157 stars 43 forks source link

fix get ip #47

Closed xiagw closed 2 months ago

devbis commented 2 months ago

The changes looks good, but the gist of the PR breaks the behavior for the main target device: openlumi xiaomi zigbee gateway use wlan0 as the single device.

# ip a | grep "inet .*br-lan" is empty

# ip a | grep "inet "
    inet 127.0.0.1/8 scope host lo
    inet 192.168.10.43/24 brd 192.168.10.255 scope global wlan0

And as a solution, you may try to check for br-lan and if empty, use the existing line.