TPLink Scan Interval default and how to change

I can’t seem to find information on the default scan interval for the tplink switch component. I would guess 30 seconds.
Can this be changed? how?

Thanks,

TP-Link what? Presence Detection (aka Device Tracker)? Bulb (aka light)? Switch?

I haven’t checked any of the tplink code to verify, but typically for device trackers the default is 12 seconds and can be changed using interval_seconds. See here.

For lights and switches the default is typically 30 seconds and can be changed using scan_interval. See here.

Thanks!
For switches; so my config would be.

switch:
  - platform: tplink
    host: 192.168.1.111
    scan_interval: 60

if i wanted 60 second interval?

Yes, that should work. (And, sorry, I now see that you said switch in your OP. :blush:)

with the new tplink integration approach (tp-link hub) it seems to no longer accept scan_interval, is there still a way?

2 Likes

I added an automation to call homeassistant.update_entity every 10 seconds on my switches. I’m using this to monitor pumps and they will run for less than 30 seconds, so if I can’t update more frequently, I will miss them entirely:

- alias: 'Scan pump power frequently'
  trigger:
    - platform: time_pattern
      seconds: '/10'
  action:
    - service: homeassistant.update_entity
      entity_id: switch.outlet_4
    - service: homeassistant.update_entity
      entity_id: switch.outlet_5
1 Like