A Home Assistant integration that fetches the official Dutch flag instruction from the Government of the Netherlands.
It tells you when to raise the Dutch flag, whether it should be flown at half-mast, and when to use the orange pennant.
- Today's flag instruction:
sensor.vlaginstructie_today - Tomorrow's flag instruction:
sensor.vlaginstructie_tomorrow - Next upcoming flag day:
sensor.next_flag_day - Binary sensors for today and tomorrow:
binary_sensor.vlag_uithangen_todaybinary_sensor.vlag_halfstok_todaybinary_sensor.vlag_uithangen_tomorrowbinary_sensor.vlag_halfstok_tomorrowbinary_sensor.oranje_wimpel_todaybinary_sensor.oranje_wimpel_tomorrow
- Automatically calculates variable days such as Veteranendag and Prinsjesdag
- Caches the official government flag instruction page
- Open HACS in Home Assistant.
- Go to Integrations.
- Open Custom repositories.
- Add this repository as an integration.
- Search for Vlaginstructie Nederland and install it.
- Download this repository as a ZIP.
- Copy
custom_components/vlaginstructie/into your Home Assistantcustom_components/directory. - Restart Home Assistant.
This integration uses the Home Assistant UI.
- Go to Settings > Devices & services.
- Select Add integration.
- Search for Vlaginstructie Nederland.
- Finish the setup flow.
No configuration.yaml setup is needed.
sensor.vlaginstructie_todaysensor.vlaginstructie_tomorrowsensor.next_flag_day
Each sensor exposes these attributes when a flag instruction exists:
| Attribute | Description |
|---|---|
reason |
The occasion, for example Dodenherdenking or Koningsdag |
date |
The ISO date of the flag instruction |
scope |
Whether the instruction is nationwide or specific |
wimpel |
true if the orange pennant should be used |
halfstok |
true if the flag should be flown at half-mast |
binary_sensor.vlag_uithangen_todaybinary_sensor.vlag_halfstok_todaybinary_sensor.vlag_uithangen_tomorrowbinary_sensor.vlag_halfstok_tomorrowbinary_sensor.oranje_wimpel_todaybinary_sensor.oranje_wimpel_tomorrow
The oranje_wimpel_* sensors are on on days where the official instruction includes an orange pennant, such as Koningsdag and birthdays of members of the Royal House.
type: markdown
title: Vlaginstructie
content: |
**Today ({{ states('sensor.vlaginstructie_today') }})**
- Reason: {{ state_attr('sensor.vlaginstructie_today', 'reason') }}
- Date: {{ state_attr('sensor.vlaginstructie_today', 'date') }}
- Half-mast: {{ state_attr('sensor.vlaginstructie_today', 'halfstok') }}
- With pennant: {{ state_attr('sensor.vlaginstructie_today', 'wimpel') }}
**Tomorrow ({{ states('sensor.vlaginstructie_tomorrow') }})**
- Reason: {{ state_attr('sensor.vlaginstructie_tomorrow', 'reason') }}
- Date: {{ state_attr('sensor.vlaginstructie_tomorrow', 'date') }}
- Half-mast: {{ state_attr('sensor.vlaginstructie_tomorrow', 'halfstok') }}
- With pennant: {{ state_attr('sensor.vlaginstructie_tomorrow', 'wimpel') }}
**Next flag day ({{ states('sensor.next_flag_day') }})**
- Reason: {{ state_attr('sensor.next_flag_day', 'reason') }}
- Date: {{ state_attr('sensor.next_flag_day', 'date') }}
- Half-mast: {{ state_attr('sensor.next_flag_day', 'halfstok') }}
- With pennant: {{ state_attr('sensor.next_flag_day', 'wimpel') }}type: entities
title: Vlaginstructie
entities:
- entity: sensor.vlaginstructie_today
name: Today
- entity: sensor.vlaginstructie_tomorrow
name: Tomorrow
- entity: sensor.next_flag_day
name: Next flag dayOn 4 May (Dodenherdenking), the flag is flown at half-mast until 18:00. After 18:00, the half-mast binary sensor turns off.
- Requires Home Assistant 2025.7.0 or newer.
- If fetching the government page fails, the last cached data is used.
- If the government page structure changes, the integration logs a warning and keeps using cached data when available.
Data source: Government of the Netherlands.