Skip to content

Ping integration warns when a manual polling method has been used #140319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bobrippling opened this issue Mar 10, 2025 · 6 comments · May be fixed by #143616
Open

Ping integration warns when a manual polling method has been used #140319

bobrippling opened this issue Mar 10, 2025 · 6 comments · May be fixed by #143616
Assignees

Comments

@bobrippling
Copy link

The problem

When I configure the ping sensor to manually update (by defining a custom polling interval), I receive these warnings in the HA log:

Update of binary_sensor.ping_<name> is taking over 10 seconds

Should the ping integration change to mark its sensor as updated, even when "Enable Polling for Changes" is disabled?

What version of Home Assistant Core has the issue?

core-2025.3.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

ping

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

@home-assistant
Copy link

Hey there @jpbede, mind taking a look at this issue as it has been labeled with an integration (ping) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of ping can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign ping Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


ping documentation
ping source
(message by IssueLinks)

@jpbede
Copy link
Member

jpbede commented Mar 10, 2025

How is your Ping config entry configured, how many ICMP requests do you send?

Update of * is taking over 10 seconds indicates that the update takes to long, this is independent from whether this was triggered manually or not

@bobrippling
Copy link
Author

Ah I see - I've got it configured to be 15 pings (and consider home to be 320 seconds). I suppose there's no way to complete in under 10 seconds or change the 10 second config as it's hardcoded:

update_warn = hass.loop.call_at(
hass.loop.time() + SLOW_UPDATE_WARNING, self._async_slow_update_warning
)

I suppose one option is to drop the amount of pings to bring it to completion in under 10s, but I have some devices which can be a little laggy to reply. What do you think?

@bobrippling
Copy link
Author

bobrippling commented Mar 21, 2025

I suppose one approach would be to fire off a timer/task and update the sensor on completion of it, rather than when asked to by HA, but I'm not familiar enough with HA's internals to know if that's a sensible approach

@jpbede
Copy link
Member

jpbede commented Mar 21, 2025

Yea something like that. We need to postpone the first ping after the start.

@bobrippling bobrippling linked a pull request Apr 24, 2025 that will close this issue
19 tasks
@bobrippling
Copy link
Author

Does #143616 look along the right lines?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants