A Home Assistant integration that automatically fetches the official Dutch flag instruction from the Government of the Netherlands.
It tells you exactly 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_tomorrow
- ✅ Automatically calculates variable days (Veterans Day, Prinsjesdag)
- ✅ Scrapes and caches the official government flag instruction page
- Open HACS in Home Assistant
- Go to Integrations
- Click ⋮ → Custom repositories
- Add this repository as an integration
- Search for Dutch Flag Instruction in HACS and install
- Download this repository as a ZIP
- Copy the folder
custom_components/vlaginstructie/into your Home Assistantcustom_components/directory - Restart Home Assistant
This integration is Config Flow-based → you can add it via the Home Assistant UI:
- Go to Settings → Devices & Services
- Click Add Integration
- Search for Dutch Flag Instruction
- Done ✅
No configuration.yaml is needed.
sensor.vlaginstructie_today→ today's flag instructionsensor.vlaginstructie_tomorrow→ tomorrow's flag instructionsensor.next_flag_day→ the name and date of the next flag day
Each of these sensors has the following attributes:
| Attribute | Description |
|---|---|
reason |
The occasion/holiday (e.g., Dodenherdenking, Bevrijdingsdag) |
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_tomorrow
These are simple on/off sensors without extra attributes.
type: markdown
title: 🇳🇱 Flag Instruction
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: 🇳🇱 Flag Instruction
entities:
- entity: sensor.vlaginstructie_today
name: Today
secondary_info: >-
{{ state_attr('sensor.vlaginstructie_today', 'reason') }}
- entity: sensor.vlaginstructie_tomorrow
name: Tomorrow
secondary_info: >-
{{ state_attr('sensor.vlaginstructie_tomorrow', 'reason') }}
- entity: sensor.next_flag_day
name: Next Flag Day
secondary_info: >-
{{ state_attr('sensor.next_flag_day', 'reason') }}- On 4 May (Remembrance Day):
- Flag is half-mast until 18:00
- From 18:00 onwards → raised to full mast
The binary sensors automatically follow this rule.
- Requires Home Assistant 2025.7.0 or newer (see hacs.json)
- If scraping fails, the last cached data will be used
Data: Government of the Netherlands