Skip to content

modbus, connect background task is not cancelled. #148516

@janiversen

Description

@janiversen

The problem

The modbus connect to a device is done in a background task, which secures the HA startup to complete faster, which is a nice thing.

However the task is not cancelled is modbus is stopped or restarted, leaving it hanging and potentially blocking a new connect.

What version of Home Assistant Core has the issue?

2025.7.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

modbus

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions