Migrate vacuum_mode switch from legacy to modern template format#53
Merged
basnijholt merged 6 commits intomainfrom Jan 4, 2026
Merged
Migrate vacuum_mode switch from legacy to modern template format#53basnijholt merged 6 commits intomainfrom
basnijholt merged 6 commits intomainfrom
Conversation
The legacy `platform: template` switch format is deprecated. This moves the vacuum_mode switch to the modern template integration format in templates.yaml and removes the now-empty switches.yaml file. Entity ID changes from switch.vacuum_mode to switch.vacuum_mode (same ID since unique_id is now set).
…cript The update-readme.py script now properly handles sensors, binary_sensors, and switches defined in templates.yaml, not just the legacy YAML files.
Also regenerate README.md with updated entity links that now correctly reference templates.yaml for template-based sensors, binary_sensors, and switches.
The script now searches for both legacy format (entity_name:) and modern template format (unique_id: entity_name), allowing it to properly link to entities defined in templates.yaml.
The script now also searches for entities by their friendly name (e.g., "name: activity in living room" for entity_id "binary_sensor.activity_in_living_room"). This finds more entities defined in templates.yaml without unique_id. Note: Some entities still can't be found due to naming mismatches (e.g., entity_id has "activity_in_living_room" but template name is "Activity in the living room" with extra "the"). These would need unique_id added to templates.yaml to be found reliably.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
switch.vacuum_modefrom deprecatedplatform: templateformat to modern template integrationincludes/switches.yamlfileconfiguration.yamlto remove unused switch includeutils/update-readme.pyto reference templates.yaml for switch entitiesContext
Home Assistant repair issue:
template: deprecate_legacy_templates_switch_vacuum_mode_2bcf32cc858bf04ac982e4af80628f87The legacy template switch format using
- platform: templateunder theswitch:domain is deprecated. The modern format uses thetemplate:integration with aswitch:section.Test plan
switch.vacuum_modeentity still works correctly