World Tide Info v2 API + graph

Whaow !! Thanks a lot !

In the card picture-elements , are the pictures reload automatically if there is a change ?

Your code works well !
image

glad it worked! you might want to change “Royan” to be whatever your local area would be - i think royan is where the code creator is from maybe?

Royan is the town where I wanted to see the tides !! :wink:
I thouht , it was easier to give example rather than rules in https://github.com/jugla/worldtidesinfocustom
To display “Royan” hereabove , I’ve taken (I think like you) the attribute that gives the reference tide station :wink:

1 Like

awesome :slight_smile:
Thanks for creating this - really helpful

Hello
In order to picture element to refresh picture you have to replace

image: local/worthing_tides.png

by the camera

camera_image: camera.royan_tides_curve

(the solution has been given https://community.home-assistant.io/t/refresh-cached-images-in-lovelace-picture-elements-maybe-other-places-too/98351 )

Is anyone able to help please.

Relatively new to HA.

Have been going round and round but entities not working or being generated, im sure it is a syntax issue somewhere as I have other custom sensors which load fine. In the entities it only finds the camera??

# WorldTides
sensor:  
  - platform: worldtidesinfocustom
    name: dungeness_tides
    api_key: ..........
    latitude: 50.917
    longitude: 0.967
    #    station_distance: 10
    #    vertical_ref : LAT
    #    scan_interval: 900
    #    worldtides_request_interval: 90000
  - platform: template
    sensors:
      tide_dungeness_next_high:
        value_template: '{{ as_timestamp(states.sensor.dungeness_tides.attributes.high_tide_time_utc) | timestamp_custom("%a %d/%m/%Y %H:%M") }}'
        friendly_name: "Dungeness Next High Tide"
      tide_dungeness_next_low:
        value_template: >
          {{ as_timestamp(states.sensor.dungeness_tides.attributes.low_tide_time_utc) | timestamp_custom("%a %d/%m/%Y %H:%M") }}
        friendly_name: 'Dungeness Next Low Tide'
      tide_dungeness_next_high_height:
        value_template: "{{ state_attr('sensor.dungeness_tides','high_tide_height')  }}"
        friendly_name: 'Dungeness Next High Tide Height'
        unit_of_measurement: m
      tide_dungeness_next_low_height:
        value_template: "{{ state_attr('sensor.dungeness_tides','low_tide_height')  }}"
        friendly_name: 'Dungeness Next Low Tide Height'
        unit_of_measurement: m
      tide_dungeness_credit:
        value_template: "{{ state_attr('sensor.dungeness_tides','CreditCallUsed')  }}"
        friendly_name: 'Dungeness Tide Credit'
        unit_of_measurement: credit
      tide_dungeness_current_height:
        value_template: "{{ state_attr('sensor.dungeness_tides','current_height')  }}"
        friendly_name: 'Dungeness Tide Current Height'
        unit_of_measurement: m
      tide_dungeness_station:
        value_template: "{{ state_attr('sensor.dungeness_tides','tidal_station_used')  }}"
        friendly_name: 'Dungeness Tide Station used'
camera:
  - platform: generic
    name: Dungeness_tides_curve
    still_image_url: https://127.0.0.1:8123/local/dungeness_tides.png
    verify_ssl: false

Please have you install the worldtidesinfocustom “custom component”?
It is not by default in HomeAssistant (HA).
Please first install hacs, https://hacs.xyz/
then worldtidesinfocustom https://github.com/jugla/worldtidesinfocustom

Yes it is installed, i have also removed and re-installed to try and fix

Just with the first declaration ,

# WorldTides
sensor:  
  - platform: worldtidesinfocustom
    name: dungeness_tides
    api_key: ..........
    latitude: 50.917
    longitude: 0.967
    #    station_distance: 10
    #    vertical_ref : LAT
    #    scan_interval: 900
    #    worldtides_request_interval: 90000

it works

Do you have anything in logs related to tides ? (Look in your configuration directory inside home-assistant.log)
Please can you see in your configuration directory/custom_components the worldtidesinfocustom directory ?

So I just deleted everything in yaml and integration from hacs. I then when through adding everything again and now working.

Not sure how/why as all code was copied both times from instructions.

Many thanks for the support and work on this

your welcome !
and thanks for your comments :slight_smile:

I love what you guys have acheived with the World Tides! I am on a small island in the Bahamas (Little Hog Cay), and have been battling to get it working. So I just tried to use the exact code you have in the example - and it just displays “unknown” for each entity. I am definitely doing something wrong - but I am stumped for 3 days now.

image

This is what I have in my configuration.yaml

sensor:
  - platform: enphase_envoy
    name: Enphase
    ip_address: 192.168.6.80
    monitored_conditions:
      - production
      - daily_production
      - seven_days_production
      - lifetime_production
  - platform: worldtidesinfocustom
    name: royan_tides
    api_key: 1c86297b-xxxx-xxxx-xxxx-1d91503xxxxx
    latitude: 45.61949378902948
    longitude: -1.0318721687376207
#    station_distance: 10
#    vertical_ref : LAT
#    scan_interval: 900
#    worldtides_request_interval: 90000
  - platform: template
    sensors:
      tide_royan_next_high:
        value_template: '{{ as_timestamp(states.sensor.royan_tides.attributes.high_tide_time_utc) | timestamp_custom("%a %d/%m/%Y %H:%M") }}'
        friendly_name: "Royan Next High Tide"
      tide_royan_next_low:
        value_template: '{{ as_timestamp(states.sensor.royan_tides.attributes.low_tide_time_utc) | timestamp_custom("%a %d/%m/%Y %H:%M") }}'
        friendly_name: "Royan Next Low Tide"
      tide_royan_next_high_height:
        value_template: "{{ state_attr('sensor.royan_tides','high_tide_height')  }}"
        friendly_name: "Royan Next High Tide Height"
        unit_of_measurement: m
      tide_royan_next_low_height:
        value_template: "{{ state_attr('sensor.royan_tides','low_tide_height')  }}"
        friendly_name: "Royan Next Low Tide Height"
        unit_of_measurement: m
      tide_royan_credit:
        value_template: "{{ state_attr('sensor.royan_tides','CreditCallUsed')  }}"
        friendly_name: "Royan Tide Credit"
        unit_of_measurement: credit
      tide_royan_current_height:
        value_template: "{{ state_attr('sensor.royan_tides','current_height')  }}"
        friendly_name: "Royan Tide Current Height"
        unit_of_measurement: m
      tide_royan_station:
        value_template: "{{ state_attr('sensor.royan_tides','tidal_station_used')  }}"
        friendly_name: "Royan Tide Station used"

camera:
  - platform: generic
    name: Royan_tides_curve
    still_image_url: https://127.0.0.1:8123/local/royan_tides.png
    verify_ssl: false

switch:
  - platform: ecoplug
    scan_interval: 10

btw, you are always welcome to stop by our Cay if you are in the Abacos.

Great work @jugla. Just migrated over and loving what you’ve done. Kudos man. :+1:

Thanks ioios-io !

Hello wreuvers,
Please can you tell me if you see “royan_tides” sensor (the value is something different than unknown.
Other sensors have no sense without this one.

Please can you see in your configuration directory/custom_components if the worldtidesinfocustom directory exists

Hi jugla

No, I do not see the toyan_tides sensor.
And I have the worldtidesinfocustom directory -
image

Thank you so much for your help!

Cheers
Wayne

@jugla - And it looks like it is fetching the info as I see the requests on the worldtides.info

When I had this issue. I found be removing all the code and hacs install then restart.

Install hacs bit then restart.

Install code then restart.

This then started working, not sure why. Prior to this no api calls were being make to world tides either.

Might be of some use.