This is a Home Assistant custom integration for Norwegian Tide which is interfacing an open API by the Norwegian Mapping Authority (Kartverket), more precisely sehavniva.no which provides information about water levels and tidal predicitions and forecasts. All data is ©Norwegian Mapping Authority (Kartverket).
This light version is a fork of the code authored by tmjo without the camera entity included. The camera entity required matplotlib to be installed and this fails with Raspberry Pi installations of Home Assistant. The version here is quite different from the original, though the original author tmjo has done much of the "heavy lifting" to make this integration work. The Norwegian Tide integration is slimmed down to remove some of the sensors and functionality that can be provided by Home Assistant through templating. The full forecast is also not provided as part of the sensor entity anymore but is available through a weather forecast style of service. This contributes to a reduction in the amount of storage required for the tide state.
Unfortunately the service only provides data for geographical positions in Norway - this is a limitation in the API and not in this integration.
There are different methods of installing the custom component. HACS is by far the simplest way for unexperienced users and is recomended.
The installation is currently not included in HACS as a default repo, but can be installed through HACS by adding this repo as a custom repository.
- Make sure you have HACS installed in your Home Assistant environment.
- Go to HACS, select Integrations.
- Click on the three dots in the upper right corner and select Custom repositories
- Copy/paste the URL for this repo
https://github.com/jm-cook/ha-norwegiantide-liteinto the URL-field, select Integration as category and then click Add. - You should now find the Norwegian Tide integration by searching for it in HACS, proceed to install it.
- Restart Home Assistant (a warning should be shown in log saying you're using a custom integration).
- Continue to the Configuration-section.
- Navigate to you home assistant configuration folder.
- Create a
custom_componentsfolder of it does not already exist, then navigate into it. - Download the folder
norwegiantide_litefrom this repo and add it into your custom_components folder. - Restart Home Assistant (a warning should be shown in log saying you're using a custom integration).
- Continue to the Configuration-section.
- Make sure you have git installed on your machine.
- Navigate to you home assistant configuration folder.
- Create a
custom_componentsfolder of it does not already exist, then navigate into it. - Execute the following command:
git clone https://github.com/tmjo/ha-norwegiantide-lite ha-norwegiantide-lite - Run
bash links.sh - Restart Home Assistant (a warning should be shown in log saying you're using a custom integration).
- Continue to the Configuration-section.
Configuration is done through UI/Lovelace. In Home Assistant, click on Configuration > Integrations where you add it with the + icon.
You will be asked to give your location a name and to provide latitude and longitude as geographical position for the location you want to track. Finally select which sensors you would like the integration to add. More detailed description of this will be added, but in short there is one main sensor which contains all info and for most people probably this may be sufficient. You do not need to add other entities unless you want, but several detailed entities are available if you prefer to have them as separate entities instead of attributes on the main sensor. There is also a camera entity which creates a plot of the data by using Matplotlib.
Entities can be added and removed by clicking Options in HA integreation view at any time. It is also possible to enable more than one location by adding the integration several times.
Use the integration as you please, but a recommended plot is the Apexchart-card by Romrider - it is an excellent graph card for lovelace which also enables the possibility to show future values. This is necessary to display prediction- and forecast values which are stored as attributes in the main sensor. Example:
The example above was created using Apexchart-card.
See here for example configurations.
More detailed description will follow, but worth mentioning:
- Prediction: A calculated prediction for the location
- Forecast: Includes the weather effect on top of the prediction
- Observation: The observed value on the closest station to your location
If you are curious about specific details and definitions, please see www.sehavniva.no.
The main sensor will keep the current forecast value as state and will contain all or most data as attributes. The other entities will contain more specific data according to their name.
Please report issues on github. If you would like to contribute to development, please do so through PRs.
MIT © Tor Magne Johannessen. All data is ©Norwegian Mapping Authority (Kartverket).
