mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-19 15:56:10 +00:00
62 lines
1.6 KiB
YAML
Executable File
62 lines
1.6 KiB
YAML
Executable File
#-------------------------------------------
|
|
# Radio Related Packages
|
|
#-------------------------------------------
|
|
#------Whole House Radio Enabled via Emulated Hue----------------------------
|
|
homeassistant:
|
|
customize:
|
|
input_boolean.house_station:
|
|
icon: mdi:radio
|
|
friendly_name: House Station
|
|
emulated_hue: True
|
|
hidden: False
|
|
#---Use this Boolean to trigger via GUI or Alexa------------------------------
|
|
input_boolean:
|
|
house_station:
|
|
name: House Station
|
|
initial: off
|
|
|
|
#-----Turn on the Music--------------------------------------
|
|
automation:
|
|
- alias: 'Play Kickin Country on ChromeCast Audio'
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- input_boolean.house_station
|
|
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: 0.2
|
|
|
|
- service: media_player.play_media
|
|
data_template:
|
|
entity_id:
|
|
- media_player.LivingRoomCC
|
|
media_content_id: "http://streaming312.radionomy.com:80/113FMHighway"
|
|
media_content_type: audio/mp4
|
|
|
|
#-----Turn off the Music--------------------------------------
|
|
- alias: 'Turn off the Radio'
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- input_boolean.house_station
|
|
state: 'off'
|
|
from: 'on'
|
|
|
|
action:
|
|
- service: media_player.turn_off
|
|
entity_id: media_player.livingroomCC
|
|
|
|
- service: input_boolean.turn_off
|
|
entity_id: input_boolean.house_station
|