Home Assistant Custom Components for DHMZ service ("Državni hidrometeorološki zavod Republike Hrvatske / "Croatian Meteorological and Hydrological Service" )
Home Assistant Custom Components for DHMZ weather service (“Državni hidrometeorološki zavod Republike Hrvatske” / “Croatian Meteorological and Hydrological Service”)
The dhmz
weather platform provide meteorological data for DHMZ service (“Državni hidrometeorološki zavod Republike Hrvatske / “Croatian Meteorological and Hydrological Service”) - https://meteo.hr/ . Data from DHMZ is listed on https://meteo.hr/proizvodi.php?section=podaci¶m=xml_korisnici and provided under Open Licence of Republic of Croatia - https://data.gov.hr/otvorena-dozvola and https://data.gov.hr/open-licence-republic-croatia .
Custom weather card is also included in the package, combining graphical forecast data in weather card.
The following device types and data are supported:
There are two options; manual or HACS installation:
Manual installation
dhmz
folder in custom_components
from repository to your Home Assistant configuration custom_components
folder. Don’t copy any other YAML files from repository root not to overwrite your own configuration.dhmz-weather-card.js
from www
repocitory folder to your Home Assistant configuration www
folderHACS installation
dhmz-weather-card.js
from www
repocitory folder to your Home Assistant configuration www
folderEach platform does not choose automatically which weather station’s data to use. Selection of different identifiers is under configuration section of this document. Current version does not validate nor enforces configuration choices, but this is down the development roadmap.
For each platform, the location to use is determined according to the following list:
The dhmz
weather platform populates a weather card with DHMZ current conditions and forecast data.
To add DHMZ weather to your installation, add the following to your configuration.yaml
file:
# Example configuration.yaml entry
weather:
- platform: dhmz
name: DHMZ Maksimir
station_name: Zagreb-Maksimir
forecast_region_name: Zagreb
forecast_text: zg_text
forecast_station_name: Zagreb_Maksimir
weather.dhmz
.Configuration
weather.<name>
.The dhmz
sensor platform creates sensors based on DHMZ current conditions data and daily forecasts.
To add DHMZ weather to your installation, add the following to your configuration.yaml
file:
# Example configuration.yaml entry
sensor:
- platform: dhmz
name: DHMZ Sensor Maksimir
station_name: Zagreb-Maksimir
forecast_region_name: Zagreb
forecast_text: zg_text
forecast_station_name: Zagreb_Maksimir
monitored_conditions:
- temperature
- pressure
- pressure_tendency
- humidity
- wind_speed
- wind_bearing
- condition
- precipitation
- forecast_text_today
- forecast_text_tommorow
sensor.<name>_temperature
: temperature
- The current temperature, in ºC.pressure
- The current air pressure, in kPa.pressure_tendency
- The current air pressure tendency, e.g. “+0.5” in last hour.humidity
- The current humidity, in %.condition
- A brief text statement of the current weather conditions, e.g. “Sunny”.wind_speed
- The current sustained wind speed, in km/h.wind_bearing
- The current cardinal wind direction, e.g. “SSW”.precipitation
- precipitation in last 24 hours, in mm.forecast_text_today
- A textual description of today’s forecastforecast_text_tommorow
- A textual description of tommorow’s forecastConfiguration
sensor.<name>_temperature
.The dhmz
camera platform displays DHMZ [radar imagery].
To add DHMZ radar imagery to your installation, add the desired lines from the following example to your configuration.yaml
file:
# Example configuration.yaml entry
camera:
- platform: dhmz
name: DHMZ Radar
delta: 300
previous_images_time: 125
current_image_time: 2000
longitude: 48
latitude: 16
mark_location: True
image_format: WebP
Configuration
camera.<name>
.image_format:
If no name
is given, the camera entity will be named camera.dhmz
.
delta
is given, default is set to 300 seconds (every 5 minutes). Since radar images on DHMZ are refreshed every 5 minutes, it is recommented to put this not less then 60 seconds (every minute). Components checks if image was actually updated and will not re-download it’s contant if it is unchanged from last check. previous_images_time
and current_image_time
can determine how radar image animation will be generated. All old but current radar images are show for previous_images_time
and only last and current radar image is shown for current_image_time
. Please note that since HA refreshes images every 10 seconds, best results are achieved if sum of all image times can be multiplied to this 10 seconds. This is why default values of 125 ms and 2000 ms - which sum up to 5 seconds (24x125+2000=5000) - which is nicely shown in the previes window without jerky and skipping frames. If changing these times it is strongly suggested to keep it to match to: 24 x previous_images_time
+ current_image_time
= 10 sec or any other common denominator of 10 sec.logitude
and latitude
are only usefull when setting mark_location
as True. mark_location
will work without explicitly stated logitude
and latitude
if HA has home location correctly configured.image_format
that animated image will be created in. Default is WebP, since it yields smaller image sizes. If you face issue in displaying WebP in your web browser, you can change to GIF, but files shall be larger and producing more traffic towards browser.Known issues
To add custom card for DHMZ weather, add following to your lovelace configuration YAML file:
resources:
- type: js
url: /local/dhmz-weather-card.js
cards:
- mode: hourly
type: 'custom:dhmz-weather-card'
weather: weather.dhmz_maksimir
show_today_text: true
show_tomorrow_text: true
With weather
attribute you should state name of the entity configured in weather compontent.
For mode, please use daily
or hourly
, since hourly
was mostly customized and tested and is preffered to be used.
Attribute show_today_text
- shows today’s text forecast (true|false), default is true.
Attribute show_tomorrow_text
- shows tomorrow’s text forecast (true|false), default is true.
RC Bilogora
Bjelovar
Crikvenica
Crni Lug-NP Risnjak
Daruvar
Delnice
Dubrovnik
Dubrovnik-aerodrom
Gospić
RC Gorice (kod Nove Gradiške)
RC Gradište (kod Županje)
Gruda
Hvar
Imotski
Karlovac
Knin
Komiža
Krapina
Krk
Križevci
Kukuljanovo
Kutjevo
Lastovo
Lipik
Malinska
Makarska
Mali Lošinj
NP Mljet
RC Monte Kope
Ogulin
Opatija
RC Osijek-Čepin
Osijek-aerodrom
Palagruža
Parg-Čabar
Pazin
NP Plitvička jezera
Ploče
Poreč
Porer - svjetionik
Prevlaka
Pula
Pula-aerodrom
RC Puntijarka
Rab
Rijeka
Rijeka-aerodrom
Sv. Ivan na pučini - svjetionik
Senj
Sinj
Sisak
Slavonski Brod
Split-Marjan
Split-aerodrom
Šibenik
Varaždin
Veli Rat - svjetionik
Vinkovci
Zadar
Zadar-aerodrom
Zagreb-Grič
Zagreb-Maksimir
Zagreb-aerodrom
Zavižan
sredisnja
istocna
gorska
unutrasnjost Dalmacije
sjeverni Jadran
srednji Jadran
juzni Jadran
Zagreb
rh_text
zg_text
Beli_Manastir
Bilogora
Bjelovar
Cavtat
Cakovec
Zracna_luka_Dubrovni
Daruvar
Delnice
Donji_Miholjac
Dubrovnik
Dakovo
Fuzine
Glina
Gospic
Gracac
Gradiste
Hreljin
Hrvatska_Kostajnica
Hvar
Ilok
Imotski
Karlovac
Knin
Komiza
Koprivnica
Korcula
Krapina
Krizevci
Krk
Lastovo
Mali_Losinj
Makarska
Maslenica
Metkovic
Korita-NP_Mljet
Most_Krk
Nasice
Nin
Nova_Gradiska
Novska
Ogulin
Orebic
Osijek
Pag
Palagruza
cabar
Pazin
NP_Plitvicka_jezera
Ploce
Pokupsko
Porec
Pozega
Pula
Rab
Rijeka
Rovinj
Rupa
Senj
Sinj
Sisak
Slatina
Slavonski_Brod
Slunj
Split
Sibenik
Udbina
Varazdin
Vela_Luka
Vinkovci
Virovitica
Vukovar
Zadar
Zagreb_Maksimir
Zavizan
Zracna_luka_Zadar