Wake on lan python error

I am trying to setup wake on lan
I have the PC setup, the switch in home assisstant monitors the correct state but I am getting this error and see the following in the log

ubyte format requires 0 <= number <= 255
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 205, in handle_service
    self._platforms.values(), func, call, service_name, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 336, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 358, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/wake_on_lan/switch.py", line 75, in turn_on
    wakeonlan.send_magic_packet(self._mac_address)
  File "/usr/local/lib/python3.7/site-packages/wakeonlan.py", line 74, in send_magic_packet
    packet = create_magic_packet(mac)
  File "/usr/local/lib/python3.7/site-packages/wakeonlan.py", line 46, in create_magic_packet
    send_data += struct.pack(b'B', int(data[i: i + 2], 16))
struct.error: ubyte format requires 0 <= number <= 255

got it working after several reboots

Looks like it’s just saying an octet in the broadcast address specified is wrong, not sure why a reboot would fix it?