Hi,
I have managed to get the the integration to Itunes and can now select airplay speakers etc.
I want to select a playlist and have managed this with the following code.
To select playlist in configuration.yaml:
CODE
itunesplaylist:
name: Itunes Playlist
options:
- ABreakfast
- Sugar Man
initial: ABreakfast
and in automations.yaml
######## Itunes Play Lists Automations #################
alias: Play Playlist ABreakfast
trigger:
platform: state
entity_id: input_select.itunesplaylist
to: “ABreakfast”
action:
Fantastic! Hi, I solved my problem. Now itunes works great.
Thank you for sharing the way to recall playlists in HA.
I added the shuffle button with the following configuration:
Sorry I don’t think it is possible to get the shuffle status.
You might be able to work around it by creating a smart playlist which has the songs shuffled e.g. ‘Album = xxx, Limit to 25 selected randomly’.
I do something similar with a script named ‘Block Party’, which chooses ‘x number of songs rated over y stars from each artist in z playlist’. It’s kind of like shuffle but for many albums at once. https://dougscripts.com/itunes/scripts/ss.php?sp=blockparty
But my shuffle command works great without having to create a mixed playlist. The problem is that if I activate shuffle from HA it updates iTunes. If instead I activate or turn off shuffle from itunes it does not update HA. Do you have any idea how to change my command?
Someone else may have an idea but as far as I know you can’t find out from iTunes if it is shuffling or not, so you’ll never be able to update HA correctly.
Hmm that’s odd. It’s working for me. It correctly displays shuffle status, and defaults to ‘Unknown’ if iTunes doesn’t have a song or playlist selected (e.g. when you first launch iTunes, and there is only an Apple and no text in the info window).
You’ll have to see what values are being captured by your rest sensor (the value_json.shuffle part). Is that part working?
Look in your ‘states’ page and find sensor.itunes_shuffle_status_raw (or whatever yours is called). You should be abel to see the state changing as you click the shuffle icon in iTunes.