core: Minecraft Server integration fails on install due to mac check, unnecessarily
The problem
The Minecraft Server integration fails to install due to the check for the mac-address.
Having tested this locally, it seems the mac address cannot be determined: getmac.get_mac_address returns an empty string. If I test this outside Home Assistant, this works perfectly:
>>> getmac.get_mac_address(ip="192.168.1.115")
'54:8d:5a:66:2c:xx'
Perhaps getmac cannot do it’s work from within the Home Assistant container?
If I remove the following check in the config_flow, all works fine and I have a running Minecraft Server integration:
if ip_address is not None and mac_address is None:
errors["base"] = "invalid_ip"
Why is the mac-check even necessary?
What version of Home Assistant Core has the issue?
2023.2.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Minecraft Server
Link to integration documentation on our website
https://www.home-assistant.io/integrations/minecraft_server/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (9 by maintainers)
MAC check is now removed in my development branch: https://github.com/elmurato/home-assistant/tree/mcserver-improve-unique-id
Config entry ID is now used as the unique ID. And additionally I added a migration function, so hopefully you should not have to remove and re-add your server to HA. I tested it on my side, but more testers would be great. Is someone willing to test this before I create a PR? Thanks in advance.
Thank you all for your reports. I started working on a small update of the integration. Once this is accepted and merged I‘ll try to remove the MAC check. We‘ll see if it gets accepted by the core team.