HI,
having several input_selects like:
media_player:
name: 'Select Media player:'
# icon: mdi:speaker-wireless
options:
- Woonkamer
- Hall
- Master bedroom
- Hobbykamer
- Gym
- Office
- Dorm Marte
- Broadcast (all)
# initial: Woonkamer
(and many other repeated yaml bits for that matter) made me try yaml anchors and try to set these in a package, so I can use them across the configuration.
I created a package_achors.yaml and have this in it:
anchors:
select_player: &select_player
- Woonkamer
- Hall
- Master bedroom
- Hobbykamer
- Gym
- Office
- Dorm Marte
- Broadcast (all)
changed the original input_select to:
media_player:
name: 'Select Media player:'
options:
<<: *select_player
but get this in config check:
2019-04-24 08:27:23 ERROR (SyncWorker_9) [homeassistant.util.yaml] found undefined alias 'select_player'
in "/config/packages/package_radio.yaml", line 216, column 11
which is the line with the anchor <<: *select_player
What am I doing wrong here?
thanks for your help.
realize anchors:
is not a component, so took that out, made no difference though. Ive tried to set the anchor in a package along side the media_player, but that wonât work either. That wouldnât be very useful though, since I need to be able to use these config globally, and not in a per package setting.
tried this too:
select_player: &select_player
options:
- Woonkamer
- Hall
- Master bedroom
- Hobbykamer
- Gym
- Office
- Dorm Marte
- Broadcast (all)
changed the original input_select to:
media_player:
name: 'Select Media player:'
<<: *select_player