Config World Tides Sensor

Anyone work out how to change the datum when using the sensor and the api?

Maybe this helps:

Hey, this is awesome, but i keep running out of my free monthly credits.
the limit is 100 credits per month

is there a way to trigger this to run only once per day?
mine is triggering every time i reboot (which is a lot at the moment due to me setting stuff up)

Oh, I still receive 1000 free credits per month, so they must have changed that value at some point.

The sensor is set to update every hour while HA is running, but it will always update when HA is started, and as far as I know you can’t easily change this.

A workaround I could think of is that if you know that you are going to make lots of changes on your system and will have to restart HA over and over again, you could temporarily disable the worldtidesinfo integration.

The best long term option would probably be to change this integration, similar to how the openuv sensor has been changed, which does not update automatically at all, but provides a service that you can call through an automation at regular intervals to retrieve an update.

no worries, thanks for reply!
i changed the pull to be daily, with a scan_interval of 43200 (see below)
so as long as i only reboot 60 times in a month, then im good :slight_smile:
changing to be like OpenUV, which i also use, would be awesome!

  ## https://www.home-assistant.io/components/worldtidesinfo/ 
  ##https://community.home-assistant.io/t/config-world-tides-sensor/61427/2
  - platform: worldtidesinfo
    api_key: !secret WorldTideAPI
    name: My Favourite Beach
    scan_interval: 43200
    latitude: !secret HomeLatitude 
    longitude: !secret HomeLongitude
  - platform: template
    sensors:
      tide_my_favourite_beach_next_high:
        value_template: '{{ as_timestamp(states.sensor.my_favourite_beach.attributes.high_tide_time_utc) | timestamp_custom("%a %d/%m/%Y %H:%M") }}'
        friendly_name: "My Favourite Beach Next High Tide"
      tide_my_favourite_beach_next_low:
        value_template: '{{ as_timestamp(states.sensor.my_favourite_beach.attributes.low_tide_time_utc) | timestamp_custom("%a %d/%m/%Y %H:%M") }}'
        friendly_name: "My Favourite Beach Next Low Tide"

Just to avoid any disappointments: 43200 seconds = 12 hours

Doh!!
Thanks for the catch, updating now

I dont know before but at least now the 100 free credits are given only once for testing the service, not every month, as theyshelve say at https://www.worldtides.info/developer

Hello,
I’ve made improvement in order to reduce the number of times the credit are used.
Hope if it an help
https://community.home-assistant.io/t/world-tide-info-v2-api-graph/260063
Philippe