Hey all,
Trying to tidy up my code and need a bit of help with this one.
Kodis setup like so as mediaplayers:
- platform: kodi
host: !secret kodi_up_ip
name: Upstairs
username: *
password: *
(same for Downstairs)
input_select with a list of my Kodis:
select_kodi:
name: Kodi
options:
- Upstairs
- Downstairs
initial: Upstairs
Example script to clean library:
kodi_clean_video_library:
alias: Clean Video Library
sequence:
- service: media_player.kodi_call_method
data:
entity_id: *** What Goes Here ***
method: VideoLibrary.Clean
How do I use the input_select entry as an entity_id to send the command to?
Do I need something (automation, booleon etc) somewhere to say 'if input_select = Upstairs set entity_id = mediaplayer.upstairs'
or is there an easier way to pull the input_selects state through as an entity_id?
This would clean up a lot of my code as I can pass everything to a set of scripts then rather than have a script per kodi instance!
TIA!