Skip to content

repair event pops action and raises error when there's another sub to repair eventsΒ #1245

@jeyrb

Description

@jeyrb

What version of Spook are you using?

4.0.1

What version of Home Assistant are you using?

2026.4.3

The problem

This started occurring, coincidentally with another app passively subscribing to repairs_issue_registry_updated. It's as if spook is popping the action on the event, then getting the event all over again and finding action already popped. Presumably event.data shouldn't be popped by subscribers.

Will turn this issue into a PR when I can, meantime maybe someone else has seen this too.

{
_timestamp: 1776950464662658,
body: Error running job: <Job listen repairs_issue_registry_updated HassJobType.Callback <function RepairsSpookEventEntity.async_added_to_hass.<locals>._fire at 0x7fcfc7051a60>>,
code_file_path: core.py,
code_function_name: homeassistant.core,
code_line_number: 1540,
dropped_attributes_count: 0,
exception_count: 1,
exception_first_occurred: 2026-04-23T14:21:04.662658+01:00,
exception_stacktrace: Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1540, in async_fire_internal
    self._hass.async_run_hass_job(job, event)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 902, in async_run_hass_job
    hassjob.target(*args)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/config/custom_components/spook/ectoplasms/repairs/event.py", line 61, in _fire
    event_type = data.pop("action")
KeyError: 'action',
instrumentation_library_name: homeassistant,
instrumentation_library_version: 1.0.0,
service_address: XXXXXXXXX,
service_name: homeassistant.core,
service_port: 8123,
service_version: 2026.4.3,
severity: ERROR
}

Anything in the logs? Paste it here!


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions