frenck / spook

A scary 👻 powerful toolbox 🧰 for Home Assistant 🏡
https://spook.boo
MIT License
381 stars 36 forks source link

Getting this one now: #185

Closed frenck closed 11 months ago

frenck commented 11 months ago

Getting this one now:


Logger: custom_components.spook
Source: custom_components/spook/repairs/lovelace_unknown_entity_references.py:263
Integration: Spook ([documentation](https://github.com/frenck/spook), [issues](https://github.com/frenck/spook/issues))
First occurred: 10:14:54 (188 occurrences)
Last logged: 11:59:09

Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0xffff59469360>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 117, in _handle_timer_finish
    await task
  File "/config/custom_components/spook/repairs/__init__.py", line 130, in _async_inspect
    await self.async_inspect()
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 108, in async_inspect
    for entity_id in self.__async_extract_entities(config)
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 159, in __async_extract_entities
    entities.update(self.__async_extract_entities_from_card(card))
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 225, in __async_extract_entities_from_card
    entities.update(self.__async_extract_entities_from_card(card))
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 235, in __async_extract_entities_from_card
    entities.update(self.__async_extract_entities_from_element(element))
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 284, in __async_extract_entities_from_element
    entities.update(self.__async_extract_entities_from_actions(config))
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 255, in __async_extract_entities_from_actions
    entities.update(self.__async_extract_entities_from_action(action))
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 263, in __async_extract_entities_from_action
    if (target := config.get(key)) and (entity_id := target.get("entity_id")):
AttributeError: 'str' object has no attribute 'get'

Originally posted by @holdestmade in https://github.com/frenck/spook/issues/180#issuecomment-1571833007

holdestmade commented 11 months ago

That was quick, I was just creating a new issue with it !

frenck commented 11 months ago

hehe :D

This is a valid one btw, I think it is caused by a service target being created using a template.

jprasm commented 11 months ago

Sorry, frenck....I'm not trying to be a pain in your neck, but I'm also getting this one related to "unknown area references":

Logger: custom_components.spook
Source: custom_components/spook/repairs/script_unknown_area_references.py:47
Integration: Spook (documentation, issues)
First occurred: 06:16:54 (1 occurrences)
Last logged: 06:16:54

Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0x7f394e38c790>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 117, in _handle_timer_finish
    await task
  File "/config/custom_components/spook/repairs/__init__.py", line 130, in _async_inspect
    await self.async_inspect()
  File "/config/custom_components/spook/repairs/script_unknown_area_references.py", line 47, in async_inspect
    ", ".join(unknown_areas),
TypeError: sequence item 0: expected str instance, Template found
frenck commented 11 months ago

That is a different error... please don't stack issues...

jprasm commented 11 months ago

sorry. understood.

frenck commented 11 months ago

It's ok, don't worry. It is just easy to loose track of issues that way :)

jprasm commented 11 months ago

Yes, of course (and sometimes newbies like me can't tell if the issue is the same/related or different). Thanks again for your attention to these things. This integration continues to be helpful.