Overhaul main dashboard, integrate cameras, update media player configs, add play/pause button for chromecasts

This commit is contained in:
KemoNine 2019-05-05 02:21:08 +00:00
parent 5aa51d0e4c
commit 247530e3a2
9 changed files with 206 additions and 9 deletions

View File

@ -1 +1,2 @@
compiled
cameras.yaml

View File

@ -0,0 +1,34 @@
# Dashboard Config
title: Cameras
widget_dimensions: [120, 120]
widget_size: [1, 1]
widget_margins: [5, 5]
columns: 8
rows: 19
global_parameters:
use_hass_icon: 1
nav_back:
widget_type: navigate
dashboard: Main
icon_inactive: mdi-arrow-left-bold-outline
widget_style: "background: MEDIUMSLATEBLUE;"
# Layout
layout:
- include: header
- include: cameras
- nav_main, clock(5x1), nav_back, reload
- camera_stairs(8x6)
-
-
-
-
-
- camera_deck(8x6)
-
-
-
-
-
- camera_living_room(8x6)

View File

@ -0,0 +1,22 @@
# Dashboard Config
title: Entertainment
widget_dimensions: [120, 120]
widget_size: [1, 1]
widget_margins: [5, 5]
columns: 4
rows: 3
global_parameters:
use_hass_icon: 1
nav_back:
widget_type: navigate
dashboard: Main
icon_inactive: mdi-arrow-left-bold-outline
widget_style: "background: MEDIUMSLATEBLUE;"
# Layout
layout:
- include: header
- nav_main, clock, nav_back, reload
- include: entertainment
- bedroom_tv(2x2), living_room_tv(2x2)

View File

@ -3,8 +3,8 @@ title: Home
widget_dimensions: [120, 120]
widget_size: [1, 1]
widget_margins: [5, 5]
columns: 4
rows: 4
columns: 6
rows: 8
global_parameters:
use_comma: 0
precision: 0
@ -14,7 +14,13 @@ global_parameters:
nav_weather:
widget_type: navigate
dashboard: Weather
icon_inactive: mdi-arrow-right-bold-outline
icon_inactive: mdi-weather-sunny
widget_style: "background: MEDIUMSLATEBLUE;"
nav_entertainment:
widget_type: navigate
dashboard: Entertainment
icon_inactive: mdi-television-classic
widget_style: "background: MEDIUMSLATEBLUE;"
nav_desk:
@ -29,6 +35,12 @@ nav_status:
icon_inactive: mdi-router-wireless-settings
widget_style: "background: MEDIUMSLATEBLUE;"
nav_cameras:
widget_type: navigate
dashboard: Cameras
icon_inactive: mdi-cctv
widget_style: "background: MEDIUMSLATEBLUE;"
# Widgets
current_weather:
widget_type: weather
@ -51,10 +63,15 @@ current_weather:
wind_speed: ""
pressure: ""
# Layout
layout:
- include: header
- nav_main, clock(2x1), reload
- current_weather(3x1), nav_weather
- nav_desk, spacer(2x1), nav_status
- include: cameras
- include: entertainment
- nav_main, clock(4x1), reload
- nav_weather, current_weather(2x1), nav_entertainment, nav_desk, nav_status
- bedroom_tv(3x2), living_room_tv(3x2)
-
- camera_stairs(3x2), camera_living_room(3x2)
-
- nav_cameras, spacer(5x1)

View File

@ -0,0 +1,43 @@
play_pause_living_room_tv:
widget_type: switch
title: Living Room
entity: switch.living_room_tv
icon_on: mdi-pause
icon_off: mdi-play
mute_living_room_tv:
widget_type: switch
title: Living Room
entity: switch.living_room_tv_mute
icon_on: mdi-volume-off
icon_off: mdi-volume-high
play_pause_bedroom_tv:
widget_type: switch
title: Bedroom
entity: switch.bedroom_tv
icon_on: mdi-pause
icon_off: mdi-play
mute_bedroom_tv:
widget_type: switch
title: Living Room
entity: switch.bedroom_tv_mute
icon_on: mdi-volume-off
icon_off: mdi-volume-high
bedroom_tv:
widget_type: media_player
entity: media_player.bedroom_tv
title: Bedroom TV
step: 5
icon_on: mdi-power-settings
icon_off: mdi-power
living_room_tv:
widget_type: media_player
entity: media_player.living_room_tv
title: Living Room TV
step: 5
icon_on: mdi-power-settings
icon_off: mdi-power

View File

@ -1,5 +1,6 @@
# General Config
ha_token: "A very big string here"
ha_api_secret: "the http_password from the main ha secrets.yaml file (needed for cameras)"
appdaemon_elevation: 0
appdaemon_latitude: 0
appdaemon_longitude: 0

View File

@ -188,6 +188,10 @@ camera: !include_dir_merge_list cameras/
# Sensors
sensor: !include_dir_merge_list sensors/
# Switches
switch: !include_dir_merge_list switches/
# Track the sun
sun:

View File

@ -1,2 +1,2 @@
media_player:
!secret google_casts
media_player:
!secret google_casts

75
switches/cast.yaml Normal file
View File

@ -0,0 +1,75 @@
- platform: template
switches:
living_room_tv:
value_template: "{{ is_state('media_player.living_room_tv', 'playing') }}"
turn_on:
service: media_player.media_play
data:
entity_id: media_player.living_room_tv
turn_off:
service: media_player.media_pause
data:
entity_id: media_player.living_room_tv
icon_template: >-
{% if is_state('media_player.living_room_tv', 'playing') %}
mdi:pause
{% else %}
mdi:play
{% endif %}
#- platform: template
# switches:
# living_room_tv_mute:
# value_template: "{{ state_attr('media_player.living_room_tv', 'is_volume_muted') != 'false' }}"
# turn_on:
# service: media_player.volume_mute
# data:
# entity_id: media_player.living_room_tv
# turn_off:
# service: media_player.volume_mute
# data:
# entity_id: media_player.living_room_tv
# icon_template: >-
# {% if state_attr('media_player.living_room_tv', 'is_volume_muted') != 'false' %}
# mdi:volume-high
# {% else %}
# mdi:volume-off
# {% endif %}
- platform: template
switches:
bedroom_tv:
value_template: "{{ is_state('media_player.bedroom_tv', 'playing') }}"
turn_on:
service: media_player.media_play
data:
entity_id: media_player.bedroom_tv
turn_off:
service: media_player.media_pause
data:
entity_id: media_player.bedroom_tv
icon_template: >-
{% if is_state('media_player.bedroom_tv', 'playing') %}
mdi:pause
{% else %}
mdi:play
{% endif %}
#- platform: template
# switches:
# bedroom_tv_mute:
# value_template: "{{ state_attr('media_player.bedroom_tv', 'is_volume_muted') != 'false' }}"
# turn_on:
# service: media_player.volume_mute
# data:
# entity_id: media_player.bedroom_tv
# turn_off:
# service: media_player.volume_mute
# data:
# entity_id: media_player.bedroom_tv
# icon_template: >-
# {% if state_attr('media_player.bedroom_tv', 'is_volume_muted') != 'false' %}
# mdi:volume-high
# {% else %}
# mdi:volume-off
# {% endif %}