Hi all,
I am currently working with a custom integration service which needs a MAC address as parameter.
Is there any default/standard option within HA to verify a MAC address or should I use common regex via “import re”?
Hi all,
I am currently working with a custom integration service which needs a MAC address as parameter.
Is there any default/standard option within HA to verify a MAC address or should I use common regex via “import re”?
I’m not seeing a mac address helper in config_validators so I don’t think there’s an existing one to leverage. However you shouldn’t have to import re and do it all yourself. Home assistant uses voluptuous for config validation and they have a match validator you should be able to use.