I don’t know what I’m doing wrong. I’ve been trying for 6 hours. (Thats me, a noob, new to .yaml and Hassio) I’ve never been able to get any part of this up and running. PS i have only one google chromecast.
I’ll post all codes im using below. Note: I have never been able to find a way to add the “input_slider:” part into my setup anywhere without Hassio config check failing or other errors.
###############Codes im using ##############
This part is in configuartion.yaml
####Selectors####
input_select:
radio_station:
name: 'Select Radio Station:'
options:
- Radio 538
- Q-Music
- 3FM
- 100% NL
- Veronica
- Sky Radio
- Arrow Classic Rock
- Classic FM
- BNR Nieuwsradio
- Smooth Jazz Tampa
- Classic Rock Florida
- Bob Sinclar Radio
- Chill Out Zone
- SLAM! Hardstyle
- Sleep Radio
- Ambient Sleeping Pill
- Radio Art - Sleep
- Ambi Nature Radio
- Calm Radio - Sleep
- Dinamo.FM Sleep
chromecast_radio:
name: 'Select Speakers:'
options:
- Living_room
- Everywhere
initial: Living_room
icon: mdi:speaker-wireless
This part is in automation.yaml
- alias: ‘Set Radio Volume’
trigger:
platform: state
entity_id: input_slider.volume_radio
action:
service: media_player.volume_set
data_template:
entity_id: media_player.living_room
volume_level: ‘{{ states.input_slider.volume_radio.state }}’
This part is in customize.yaml
script.radio538:
friendly_name: Start Playing
icon: mdi:play
This part is in groups.yaml
####Views####
media_view:
name: All Media
view: yes
entities:
- camera.logitech_usb_cam_1
- camera.win_ip_cam_1
- media_player.living_room
- group.residence_radio_group
####Groups####
residence_radio_group:
name: Internet Radio
entities:
- input_select.radio_station
- input_select.chromecast_radio
- script.radio538
- input_slider.volume_radio
This is in scripts.yaml
radio538:
alias: Play Radio on Chromecast Audio
sequence:
- service: media_player.volume_set
data_template:
entity_id: >
{% if is_state(“input_select.chromecast_radio”, “Livingroom”) %} media_player.living_room
{% elif is_state(“input_select.chromecast_radio”, “Everywhere”) %} media_player.home_group
{% endif %}
volume_level: ‘{{ states.input_slider.volume_radio.state }}’
- service: media_player.play_media
data_template:
entity_id: >
{% if is_state(“input_select.chromecast_radio”, “Livingroom”) %} media_player.living_room
{% elif is_state(“input_select.chromecast_radio”, “Everywhere”) %} media_player.home_group
{% endif %}
media_content_id: >
{% if is_state(“input_select.radio_station”, “Radio 538”) %} http://vip-icecast.538.lw.triple-it.nl:80/RADIO538_MP3
{% elif is_state(“input_select.radio_station”, “Q-Music”) %} http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_live_96.mp3
{% elif is_state(“input_select.radio_station”, “3FM”) %} http://icecast.omroep.nl/3fm-bb-mp3
{% elif is_state(“input_select.radio_station”, “100% NL”) %} http://stream.100p.nl/100pctnl.mp3
{% elif is_state(“input_select.radio_station”, “Veronica”) %} http://8543.live.streamtheworld.com/VERONICACMP3
{% elif is_state(“input_select.radio_station”, “Sky Radio”) %} http://8623.live.streamtheworld.com:80/SKYRADIOAAC_SC
{% elif is_state(“input_select.radio_station”, “Arrow Classic Rock”) %} http://91.221.151.155/listen.mp3
{% elif is_state(“input_select.radio_station”, “Classic FM”) %} http://19143.live.streamtheworld.com/CLASSICFM_SC
{% elif is_state(“input_select.radio_station”, “BNR Nieuwsradio”) %} http://icecast-bnr.cdp.triple-it.nl/bnr_mp3_96_03
{% elif is_state(“input_select.radio_station”, “Smooth Jazz Tampa”) %} http://us3.internet-radio.com:8007/listen.mp3
{% elif is_state(“input_select.radio_station”, “Classic Rock Florida”) %} http://listen.shoutcast.com/Classic-RockFlorida
{% elif is_state(“input_select.radio_station”, “Bob Sinclar Radio”) %} http://listen.shoutcast.com/prysmradio09-mp3
{% elif is_state(“input_select.radio_station”, “Chill Out Zone”) %} http://air.chillout.zone:8000/radio
{% elif is_state(“input_select.radio_station”, “SLAM! Hardstyle”) %} http://stream.radiocorp.nl/web11_mp3
{% elif is_state(“input_select.radio_station”, “Sleep Radio”) %} http://37.59.28.208:8722/stream
{% elif is_state(“input_select.radio_station”, “Ambient Sleeping Pill”) %} http://perseus.shoutca.st:8447/h
{% elif is_state(“input_select.radio_station”, “Radio Art - Sleep”) %} http://live.radioart.com/fSleep.mp3
{% elif is_state(“input_select.radio_station”, “Ambi Nature Radio”) %} http://94.23.252.14:8067/stream
{% elif is_state(“input_select.radio_station”, “Calm Radio - Sleep”) %} http://streams.calmradio.com/api/39/128/stream
{% elif is_state(“input_select.radio_station”, “Dinamo.FM Sleep”) %} http://channels.dinamo.fm/sleep-aac
{% endif %}
media_content_type: ‘audio/mp4’
Have never been able to put this in anywhere…
input_slider:
volume_radio:
name: Volume
icon: mdi:volume-high
min: 0
max: 1
step: 0.05
I have many other things configured and working
Below is complete configuration.yaml with secrets redacted.
#############Complete configuration.yaml###########
homeassistant:
Name of the location where Home Assistant is running
name: Home
Location required to calculate the time the sun rises and sets
latitude: -xx.xxxx
longitude: -xx.xxxx
Impacts weather/sunrise data (altitude above sea level in meters)
elevation: x
metric for Metric, imperial for Imperial
unit_system: imperial
time_zone: America/New_York
Customization file
customize: !include customize.yaml
Show links to resources in log and frontend (unComment the line below to show introduction)
introduction:
Enables the frontend
frontend:
themes: !include theme.yaml
Enables configuration UI
config:
http:
Secrets are defined in the file secrets.yaml
Uncomment this if you are using SSL/TLS, running in Docker container, etc.
base_url: https://xxxxx.xxxxxxx.xxx.xx.x.x.x.xxx.:xxxx
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
api_password: !secret api_password
Checks for available updates
Note: This component will send some information about your system to
the developers to assist with development of Home Assistant.
For more information, please see:
updater:
Optional, allows Home Assistant developers to focus on popular components.
include_used_components: true
Discover some devices automatically
discovery:
Allows you to issue voice commands from the frontend in enabled browsers
conversation:
Enables support for tracking state changes over time
history:
View all events in a logbook
logbook:
Enables a map showing the location of tracked devices
map:
Track the sun
sun:
Platform systemmonitor displays CPU and Memory Usage Data , Platform darksky displays weather infromation.
sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /home
- type: memory_free
- type: load_1m
- type: network_in
arg: wlan0
- type: network_out
arg: wlan0
- type: processor_use
- type: since_last_boot
- type: last_boot
- platform: darksky #
api_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
monitored_conditions:
- summary
- icon
- nearest_storm_distance
- daily_summary
- precip_type
- precip_intensity
- precip_intensity_max
- precip_probability
- temperature
- temperature_max
- temperature_min
- apparent_temperature
- apparent_temperature_max
- apparent_temperature_min
- dew_point
- wind_speed
- wind_bearing
- cloud_cover
- humidity
- pressure
- visibility
- minutely_summary
- hourly_summary
- uv_index
update_interval: ‘00:30’
Text to speech
tts:
Cloud
cloud:
Group
group: !include groups.yaml
Automation
automation: !include automations.yaml
Script
script: !include scripts.yaml
All Custom Component Add-ons & Codes Belong Below /THIS LINE/
Start of Custom Component Add-ons & Codes
Device Tracker via NMAP
device_tracker:
- platform: nmap_tracker
hosts:
- xx.xx.x.xxx-199
- xx.xx.x.xxx-170
home_interval: 10
exclude:
- xx.xx.x.xxx-xxx
panel_iframe: !include panels.yaml
ifttt:
key: xxxxxxxxxxxxxxxxxxxxxxxxxx
camera:
- platform: local_file
name: logitech USB Cam 1
file_path: /share/motion/lastsnap.jpg
- platform: mjpeg
name: Win IP Cam 1
mjpeg_url: http://xx.xx.x.xxx:xxxx/mjpeg
username: !secret winipcam1_username
password: !secret winipcam1_password
switch:
- platform: wake_on_lan
mac_address: “xx-xx-xx-xx-xx-xx”
####Selectors####
input_select:
radio_station:
name: ‘Select Radio Station:’
options:
- Radio 538
- Q-Music
- 3FM
- 100% NL
- Veronica
- Sky Radio
- Arrow Classic Rock
- Classic FM
- BNR Nieuwsradio
- Smooth Jazz Tampa
- Classic Rock Florida
- Bob Sinclar Radio
- Chill Out Zone
- SLAM! Hardstyle
- Sleep Radio
- Ambient Sleeping Pill
- Radio Art - Sleep
- Ambi Nature Radio
- Calm Radio - Sleep
- Dinamo.FM Sleep
chromecast_radio:
name: ‘Select Speakers:’
options:
- Living_room
- Everywhere
initial: Living_room
icon: mdi:speaker-wireless