home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.43k stars 29.9k forks source link

Message not displayed (sometimes) #65983

Closed frank8the9tank closed 2 years ago

frank8the9tank commented 2 years ago

The problem

I have a couple of automation that notifies me of certain changes in home assistant. Most of the time this works fine 80-90%, but some times is does not. Then in the log shows this error code:

TypeError: string indices must be integers

But when i try to change anything to the automation of call it manual i cannot reproduce the error.

What version of Home Assistant Core has the issue?

core-2022.2.3

What was the last working version of Home Assistant Core?

at least the couple of versions.

What type of installation are you running?

Home Assistant OS

Integration causing the issue

LaMetric

Link to integration documentation on our website

https://www.home-assistant.io/integrations/lametric/

Diagnostics information

Not possbile, as the integration has to be added trought the configuration file.

Full error (1): `Logger: homeassistant.components.automation.heatpump_start_notification Source: components/lametric/notify.py:151 Integration: Automation (documentation, issues) First occurred: February 6, 2022, 13:53:47 (4 occurrences) Last logged: 02:11:39

Nibe - Compressor heatpump start notification: Error executing script. Unexpected error for call_service at pos 1: string indices must be integers While executing automation automation.heatpump_start_notification Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 372, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 575, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1630, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1667, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 222, in _async_notify_message_service await self.async_send_message(*kwargs) File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 198, in async_send_message await self.hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/lametric/notify.py", line 151, in send_message lmn.set_device(dev) File "/usr/local/lib/python3.9/site-packages/lmnotify/lmnotify.py", line 139, in set_device self.set_apps_list() File "/usr/local/lib/python3.9/site-packages/lmnotify/lmnotify.py", line 324, in set_apps_list result = self._exec(cmd, url) File "/usr/local/lib/python3.9/site-packages/lmnotify/lmnotify.py", line 80, in _exec url = url % self.dev["ipv4_internal"] TypeError: string indices must be integers`

Error 2:

`Logger: homeassistant.components.automation.nibe_vvm_hotwater_production_started_duplicate Source: components/lametric/notify.py:151 Integration: Automation (documentation, issues) First occurred: February 6, 2022, 16:02:18 (4 occurrences) Last logged: 04:33:59

Nibe - VVM hotwater production stopped: Error executing script. Unexpected error for call_service at pos 1: string indices must be integers While executing automation automation.nibe_vvm_hotwater_production_started_duplicate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 372, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 575, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1630, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1667, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 222, in _async_notify_message_service await self.async_send_message(*kwargs) File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 198, in async_send_message await self.hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/lametric/notify.py", line 151, in send_message lmn.set_device(dev) File "/usr/local/lib/python3.9/site-packages/lmnotify/lmnotify.py", line 139, in set_device self.set_apps_list() File "/usr/local/lib/python3.9/site-packages/lmnotify/lmnotify.py", line 324, in set_apps_list result = self._exec(cmd, url) File "/usr/local/lib/python3.9/site-packages/lmnotify/lmnotify.py", line 80, in _exec url = url % self.dev["ipv4_internal"] TypeError: string indices must be integers `

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

lametric documentation lametric source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @robbiet480, @frenck, mind taking a look at this issue as it has been labeled with an integration (lametric) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

frenck commented 2 years ago

Thanks, @frank8the9tank 👍

Maybe good to know that I'm currently in the process of completely replacing this integration with a new version.

frank8the9tank commented 2 years ago

That sounds very promising.

frenck commented 2 years ago

https://twitter.com/Frenck/status/1484828864090103809