diff --git a/packages/radio.yaml b/packages/radio.yaml new file mode 100755 index 00000000..93b9e42d --- /dev/null +++ b/packages/radio.yaml @@ -0,0 +1,68 @@ +#------------------------------------------- +# Radio Related Packages +#------------------------------------------- +#------Whole House Radio Enabled via Emulated Hue---------------------------- +homeassistant: + customize: + input_boolean.radio: + icon: mdi:radio + friendly_name: Streaming Radio + emulated_hue: True + hidden: False +#---Use this Boolean to trigger via GUI or Alexa------------------------------ +input_boolean: + radio: + name: Radio + initial: off + +#-----Turn on the Music-------------------------------------- +automation: + - alias: 'Play Kickin Country on ChromeCast Audio' + + trigger: + - platform: state + entity_id: + - input_boolean.radio + state: 'on' + from: 'off' + + action: + - service: media_player.turn_on + entity_id: media_player.livingroomCC + + - service: media_player.volume_set + entity_id: + - media_player.livingroomCC + data_template: + volume_level: > + {% if now().strftime("%H")|int < 12 and now().strftime("%H")|int > 6%} + 0.45 + {% elif now().strftime("%H")|int > 12 and now().strftime("%H")|int < 17%} + 0.7 + {% else %} + 0.40 + {% endif %} + + - service: media_player.play_media + data_template: + entity_id: + - media_player.LivingRoomCC + media_content_id: "http://dir.xiph.org/listen/113920/listen.m3u" + media_content_type: audio/mp4 + +#-----Turn off the Music-------------------------------------- + - alias: 'Turn off the Radio' + + trigger: + - platform: state + entity_id: + - input_boolean.radio + state: 'off' + from: 'on' + + action: + - service: media_player.turn_off + entity_id: media_player.livingroomCC + + - service: input_boolean.turn_off + entity_id: input_boolean.radio diff --git a/packages/space.yaml b/packages/space.yaml index 92a287f6..c94bdc4c 100755 --- a/packages/space.yaml +++ b/packages/space.yaml @@ -15,12 +15,13 @@ binary_sensor: show_on_map: False #------------------------------------------- automation: - - alias: 'ISS is above us!' + - alias: 'ISS is above us' trigger: - platform: state entity_id: - binary_sensor.iss + state: 'on' from: 'off' action: