Aware we can disable integration automatic polling in the systemmoption panel, I did so with an integration KNMI.
Alingside that Integration, I also have a rest sensor using the same resource. So I set that to 86400 hoping to update both with an automation each 10 minutes. 6*24 = 144 per integration per day would result in 288. nicely inside the limit.
rest:
- resource: !secret weerlive_resource
scan_interval: 86400
sensor:
- unique_id: weerlive_api_response_alarm_rest
value_template: >
{{value_json.liveweer[0].alarm}}
json_attributes_path: '$.liveweer[0]'
json_attributes:
- plaats
- timestamp
- time
- alarmtxt
- unique_id: weerlive_api_response_actueel_rest
value_template: >
{{value_json.liveweer[0].samenv}}
json_attributes_path: '$.liveweer[0]'
json_attributes:
- plaats
- timestamp
- time
etcetc
and 2 more sensors of the same style.
I am not sure how to update that KNMI Integration using its device_id because
nor cant I find the rest sensor in the list of updatable entities. Only the individual sensors under the define main resource. I could add those individually, but am not sure off the get refreshed data from the resource?
I did a quick test to only update a single entity and the timestamps of the others were changed to, so I guess thats a yes?
It would solve half the problem…
- id: update_weerlive_knmi
trigger:
platform: time_pattern
minutes: '/12'
action:
service: homeassistant.update_entity
target:
entity_id:
# do I nee all individual entities, or will 1 suffice and update the main data for all
- sensor.weerlive_voorspelling_morgen
- sensor.weerlive_voorspelling_vandaag
- sensor.weerlive_actueel
- sensor.weerlive_alarm
# how to update this integration
device_id:
- 283263df2cf63301888cf4096178ffb7
area_id: []
data: {}
it would allow me to do:
action:
service: homeassistant.update_entity
target:
entity_id:
# - sensor.weerlive_voorspelling_morgen
# - sensor.weerlive_voorspelling_vandaag
# - sensor.weerlive_actueel
- sensor.weerlive_alarm
device_id:
- 283263df2cf63301888cf4096178ffb7
if the device_id would update because of that.
wonder if I should turn to:
service: homeassistant.reload_config_entry
data: {}
target:
device_id: 283263df2cf63301888cf4096178ffb7
though that seems to be a heavy lift for updating its data only…
action:
- service: homeassistant.update_entity
target:
entity_id: sensor.weerlive_alarm
- service: homeassistant.reload_config_entry
data: {}
target:
device_id: 283263df2cf63301888cf4096178ffb7
appreciate any hint