jugla
December 26, 2020, 6:33pm
1
Hello
I’ve made some improvment in WordlTideInfo integration.
I take the API v2. I let the same current behaviour.
And I have the picture for the current tide !!
I will perform a pull request. Is there someone, that can tell me how to proceed ?
Thanks in advance
Philippe
jugla
December 26, 2020, 11:02pm
2
Finally , I’ve found a way
home-assistant:dev
← jugla:patch-1
opened 07:28PM - 26 Dec 20 UTC
1 Like
jugla
January 4, 2021, 11:30pm
3
Unfortunately, my pull request has been denied. (New rule request to have a PyPi library to access external ressource)
In order to share the work, I’ve put the custom component on github
https://github.com/jugla/worldtidesinfocustom
If you find mistake and you want to improve, thanks in advance fo comments/help
1 Like
This looks great, but I’m not finding it in HACS.
EDIT: I see HACS inclusion status is “Pull request undergoing”, so I’ll wait
I finally got around to migrating from the official component. This is great. Thanks. Example using and entities card and the “camera”:
Which card did you use for the following example from the your repository?
1 Like
jugla
February 27, 2021, 7:49am
6
The last card is the history graph.
==> first is the sensor given by the declaration in configuration.yaml (in my example royan_tides ).
==> the second is the current height, you create a sensor “template” that gives the value of an attribute of “royan_tides” (in my example tide_royan_current_height )
cf. https://github.com/jugla/worldtidesinfocustom
1 Like
thnaks!
this is great.
here is my card using the image and some extra info.
elements:
- entity: sensor.tide_worthing_station
style:
background-color: 'rgba(0, 0, 0, 0.3)'
bottom: 0
color: white
font-size: 14px
left: 0
line-height: 34px
padding: 0 15px
pointer-events: none
transform: initial
font-weight: bold
width: 100%
type: state-label
- entity: sensor.tide_worthing_current_height
style:
color: white
font-size: 12px
line-height: 32px
margin: 150px 5px
pointer-events: none
font-weight: bold
right: 0
top: 0
transform: initial
prefix: 'Current Tide Height : '
type: state-label
- entity: sensor.tide_worthing_next_high
style:
color: black
font-size: 12px
line-height: 32px
margin: 1px 35px
pointer-events: none
font-weight: bold
right: 0
top: 0
transform: initial
prefix: 'Next High Tide : '
type: state-label
- entity: sensor.tide_worthing_next_high_height
style:
color: black
font-size: 12px
line-height: 32px
margin: 30px 35px
font-weight: bold
pointer-events: none
right: 0
top: 0
transform: initial
prefix: 'High Tide Height: '
type: state-label
- icon: 'mdi:arrow-up-bold'
style:
color: black
line-height: 32px
margin: 39px 20px
pointer-events: none
right: 0
top: 0
transform: scale(0.8)
type: icon
- entity: sensor.tide_worthing_next_low
style:
color: black
font-weight: bold
font-size: 12px
line-height: 32px
margin: 59px 35px
pointer-events: none
right: 0
top: 0
transform: initial
prefix: 'Next Low Tide : '
type: state-label
- entity: sensor.tide_worthing_next_low_height
style:
color: black
font-weight: bold
font-size: 12px
line-height: 32px
margin: 84px 35px
pointer-events: none
right: 0
top: 0
transform: initial
type: state-label
prefix: 'Low Tide Height : '
- icon: 'mdi:arrow-down-bold'
style:
color: black
line-height: 40px
margin: 88px 20px
pointer-events: none
right: 0
top: 0
transform: scale(0.8)
type: icon
image: local/worthing_tides.png
type: picture-elements
2 Likes
jugla
March 7, 2021, 11:35am
8
Whaow !! Thanks a lot !
In the card picture-elements
, are the pictures reload automatically if there is a change ?
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?
jugla
March 7, 2021, 9:20pm
11
Royan is the town where I wanted to see the tides !!
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
1 Like
awesome
Thanks for creating this - really helpful
jugla
March 9, 2021, 6:29pm
13
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
jugla
March 16, 2021, 7:11pm
15
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
jugla
March 17, 2021, 7:33pm
17
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
jugla
March 17, 2021, 7:37pm
18
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
jugla
March 17, 2021, 8:50pm
20
your welcome !
and thanks for your comments