kennedyshead / aioasuswrt

MIT License
24 stars 24 forks source link

Fix async_get_nvram and add mac-address info #69

Closed ollo69 closed 3 years ago

ollo69 commented 3 years ago

This PR is just to add the possibility to get the router mac-address from the label_mac NVRAM key. This can be used to allow configuration of multiple devices in Home Assistant integration.

I also implemented this 2 changes for async_get_nvram command:

1) added support for cached data (to avoid multiple call to the router in cached period) 2) fixed used regex expression adding ^ at the begin, to avoid getting wrong values (e.g the MODEL command return the key cfg_obmodel instead of key model from NVRAM)

Sorry if something here is wrong.

kennedyshead commented 3 years ago

It would be great if you could rebase this @ollo69