Browse Source

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

master
KemoNine 2 years ago
parent
commit
247530e3a2
  1. 1
      appdaemon/.gitignore
  2. 34
      appdaemon/dashboards/Cameras.dash
  3. 22
      appdaemon/dashboards/Entertainment.dash
  4. 31
      appdaemon/dashboards/Main.dash
  5. 43
      appdaemon/dashboards/entertainment.yaml
  6. 1
      appdaemon/secrets-example.yaml
  7. 4
      configuration.yaml
  8. 4
      media/cast.yaml
  9. 75
      switches/cast.yaml

1
appdaemon/.gitignore

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

34
appdaemon/dashboards/Cameras.dash

@ -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)

22
appdaemon/dashboards/Entertainment.dash

@ -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)

31
appdaemon/dashboards/Main.dash

@ -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)

43
appdaemon/dashboards/entertainment.yaml

@ -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

1
appdaemon/secrets-example.yaml

@ -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

4
configuration.yaml

@ -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:

4
media/cast.yaml

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

75
switches/cast.yaml

@ -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 %}
Loading…
Cancel
Save