It’s not only about the value, but also the config option, which is being deprecated for all integrations that still uses it. It’s not specific to the ping integration. This was an architectural decision by die HA core team. I don’t think any debate on that point will change it.
I tend to agree that “scan_interval” could be / should be deprecated:
- Less experienced users will use a default freq.
- More experienced users will use an automation - it is MUCH BETTER: you may update conditionally, you may stop updating. These things were not possible (if I am right) with “scan_interval”.
The first time the automation is triggered, the value of last_triggered
is none
and the subtraction will fail with an error message.
You can mitigate it with a default
filter but the resulting template won’t be simpler than this:
{{ now().timestamp() | int(0) % 90 == 0 }}
Oh boy, do you mean these options?
If so, many integrations use that, and this could become a mess. I might not be understanding this right though and haven’t been able to find the discussions in github around this. Do you have any links you can share with discussions around deprecating the integration’s config options? Definitely curious to know more about this.
Config options are not being deprecated.
Standard Polling Frequency
The standard Ping polling frequency in 2023.12.0 is 5 minutes. This has been updated in 2023.12.1 to a polling frequency of 30 seconds.
Consider Home
Consider home will be available in 2024.1.x. If you join the beta, you can have it as early as December 28th 2023.
Altering Default Polling Frequency
To alter the default polling rate:
- Disable polling (Note this does not disable a single poll that occurs at startup)
- 3 vertical dots → System Options → Turn off
Enable polling for updates.
- 3 vertical dots → System Options → Turn off
- Create an automation with any polling rate you desire using any number of available triggers.
Heres a typical automation with a 15 second polling rate for multiple ping entitiestrigger: - platform: time_pattern seconds: "/15" action: - service: homeassistant.update_entity target: entity_id: - sensor.ping_device1 - sensor.ping_device2
The comeback is great news! Thanks! Do you happen to know why it wasn’t documented in 2023.12 release notes as a breaking change?
Just curious, as I already explained how I feel (I agree with the change but not with the timing): do you know why the Nmap Tracker scan_interval
wasn’t removed when it was moved to config flow/UI?
I have unfortunately no idea. I can only speculate. It could’ve been an oversight. I only used the nmap tracker for a short while when I started using HA ~5 years ago, but I dropped it so haven’t followed its updates too closely. Perhaps one of the core devs see your comment and can chime in.
Thanks anyways!
I have just upgraded to 2023.12.1 and have discovered that the service I used to call ‘ping.reload’ has also been removed. Probably not a bad thing as I may have been using it incorrectly in the first place (4 years ago) in an attempt to re-ping all my family’s phones shortly after the front-door opened.
Just change that to homeassistant.update_entity listing out the entities that ping the phones.
Thanks petro - I ended up doing this (as I need to call in in a few places)
script:
alias: phones_ping_update_entity
sequence:
- service: homeassistant.update_entity
target:
entity_id: "{{integration_entities('ping')|select('contains', 'binary_sensor.ping_phone_')|list}}"
data: {}
mode: queued
icon: mdi:cellphone-arrow-down
max: 11
right, I forgot to add what I usually add with these this.attributes.last_triggered
:
if this.attributes.last_triggered is not none else true}}
that would be confirmation of your comment… not simpler at all
Has anyone found the new integration flaky as well?
Now my phones seem to flap on/ off. I have a TTS to greet family members, now it goes off every time someone walks into the kitchen
Ive tried re-adding the devices, but that seems to not make a difference as well as not being able to name the device
You need to add it as a host then go in and change it.
Why was this done at all??
It’s sad to see changing integration from yaml to GUI most of the time means degradation (less user settings and flexibility).
Could the HA team somehow force the integration developers to implement all existing yaml parameters to GUI before accepting the GUI version?
Because now when in the release notes I see my active integration moving to GUI always makes a sad smiley on my face (knowing I will loose more than I gain)…
What does ping count even mean? its not in the doco.
it’s your phone saving battery power and disconnecting from the wifi …
this is with the default scan_interval.
it will be solved when consider_home
is implemented next update (2024.1)
Yes, i just copied everything from latest branch into my own home assistant and you can adjust consider home on the UI, which should eliminate flakiness.
It should be better named as consider not home
because whenever the device is pinged, it is assumed at home but it should be offline for consider home
duration in seconds to become not home
.
I setup my ping sensor to 10 seconds and consider home
to 30 seconds and it is not flakey anymore.
Overall, many of us spent lots of time on this just because there is a believe that people might abuse ping sensor to disturb other services. And the way we solve the problem, just making it harder to abuse and hope that not bad actors or naive ones found it out