I have a UK phone number. I get the following log error message. Does anyone know if this a Twilio issue or an HA issue please?
Logger: homeassistant.components.automation.alert_twilio
Source: helpers/script.py:468
Integration: Automation (documentation, issues)
First occurred: 09:59:07 (2 occurrences)
Last logged: 10:00:45
Alert Twilio: Error executing script. Unexpected error for call_service at pos 1: HTTP 400 error: Unable to create record: The 'To' number 44785072XXXX is not a valid phone number
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 264, in _async_notify_message_service
await self.async_send_message(**kwargs)
File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 240, in async_send_message
await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/twilio_sms/notify.py", line 72, in send_message
self.client.messages.create(to=target, **twilio_args)
File "/usr/local/lib/python3.11/site-packages/twilio/rest/api/v2010/account/message/__init__.py", line 79, in create
payload = self._version.create(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/twilio/base/version.py", line 209, in create
raise self.exception(method, uri, response, 'Unable to create record')
twilio.base.exceptions.TwilioRestException: HTTP 400 error: Unable to create record: The 'To' number 44785072XXXX is not a valid phone number