This is my automation. I need the 5 minute wait or while there is an object in my driveway it will send a notification every 10 seconds until the object leaves. I cannot get HA to proceed past this HTTP error to the wait. Even though the error happens every time, all notifications still work. I’d either like to fix the error or make HA ignore it.
alias: Notification - Driveway Motion
description: ""
trigger:
- type: turned_on
platform: device
device_id: 1d2dcf7f3300e122b6b7a7fc21a2150d
entity_id: binary_sensor.driveway_person
domain: binary_sensor
- type: turned_on
platform: device
device_id: 1d2dcf7f3300e122b6b7a7fc21a2150d
entity_id: binary_sensor.driveway_vehicle
domain: binary_sensor
condition:
- condition: state
entity_id: binary_sensor.pressure_washer_sensor_contact
state: "off"
action:
- service: camera.snapshot
continue_on_error: true
data:
filename: /config/www/images/driveway.jpg
target:
entity_id:
- camera.driveway_sub
- service: notify.only_phones
continue_on_error: true
data:
message: Driveway Motion
data:
image: /local/images/driveway.jpg
ttl: 0
priority: high
clickAction: /ccab4aaf_frigate-beta/dashboard
- if:
- condition: not
conditions:
- condition: state
entity_id: media_player.yamaha_receiver
state: "off"
then:
- service: notify.living_room_tv_notifications
continue_on_error: true
data:
message: Driveway Motion
data:
duration: 10
fontsize: max
position: top-left
image:
path: /config/www/images/driveway.jpg
timeout: 15
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
mode: single
Logger: homeassistant.components.automation.notification_driveway_motion
Source: components/nfandroidtv/notify.py:150
Integration: Automation (documentation, issues)
First occurred: 08:23:36 (42 occurrences)
Last logged: 10:11:13
Notification - Driveway Motion: If at step 3: Error executing script. Unexpected error for call_service at pos 1: HTTPConnectionPool(host='192.168.50.111', port=7676): Read timed out. (read timeout=5)
Notification - Driveway Motion: Error executing script. Unexpected error for if at pos 3: HTTPConnectionPool(host='192.168.50.111', port=7676): Read timed out. (read timeout=5)
While executing automation automation.notification_driveway_motion
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.10/http/client.py", line 279, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
TimeoutError: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.10/site-packages/urllib3/packages/six.py", line 770, in reraise
raise value
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 451, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 340, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.50.111', port=7676): Read timed out. (read timeout=5)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1845, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
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.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/nfandroidtv/notify.py", line 150, in send_message
self.notify.send(
File "/usr/local/lib/python3.10/site-packages/notifications_android_tv/notifications.py", line 147, in send
response = requests.post(
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 578, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.50.111', port=7676): Read timed out. (read timeout=5)