From 5aa51d0e4c74061d9fc52bea3a625872c66f40e9 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sat, 4 May 2019 23:00:39 +0000 Subject: [PATCH] Add dashboard for desk and system status --- appdaemon/dashboards/Desk.dash | 68 ++++++++++++++++++++++++++++++++ appdaemon/dashboards/Main.dash | 17 +++++++- appdaemon/dashboards/Status.dash | 27 +++++++++++++ appdaemon/dashboards/header.yaml | 4 ++ appdaemon/dashboards/status.yaml | 55 ++++++++++++++++++++++++++ 5 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 appdaemon/dashboards/Desk.dash create mode 100644 appdaemon/dashboards/Status.dash create mode 100644 appdaemon/dashboards/status.yaml diff --git a/appdaemon/dashboards/Desk.dash b/appdaemon/dashboards/Desk.dash new file mode 100644 index 0000000..0c239e3 --- /dev/null +++ b/appdaemon/dashboards/Desk.dash @@ -0,0 +1,68 @@ +# Dashboard Config +title: Desk +widget_dimensions: [120, 120] +widget_size: [1, 1] +widget_margins: [5, 5] +columns: 4 +rows: 4 +global_parameters: + use_comma: 0 + precision: 2 + use_hass_icon: 1 + shorten: 1 + +nav_back: + widget_type: navigate + dashboard: Main + icon_inactive: mdi-arrow-left-bold-outline + widget_style: "background: MEDIUMSLATEBLUE;" + +temp: + widget_type: sensor + title: "Temperature" + entity: sensor.sparkfun_weather_station_temp_f + sub_entity: sensor.sparkfun_weather_station_temp_c + units: '°F' + +heat_index: + widget_type: sensor + title: "Heat Index" + entity: sensor.sparkfun_weather_station_hi_f + sub_entity: sensor.sparkfun_weather_station_hi_c + units: '°F' + +humidity: + widget_type: gauge + title: "Humidity" + entity: sensor.sparkfun_weather_station_humidity_percent + units: "%" + min: 0 + max: 100 + +pressure: + widget_type: sensor + title: Pressure + entity: sensor.sparkfun_weather_station_pressure_pa + units: 'Pa' + +light: + widget_type: gauge + entity: sensor.sparkfun_weather_station_light_lvl_v + min: 0 + max: 10 + units: "V" + +light_value: + widget_type: sensor + title: Light Level + entity: sensor.sparkfun_weather_station_light_lvl_v + units: 'V' + +# Layout +layout: + - include: header + - nav_main, clock, nav_back, reload + - temp, heat_index, humidity, pressure + - light_value, light, spacer(2x1) + - include: status + - ac_status, battery_status, battery_capacity, battery_voltage \ No newline at end of file diff --git a/appdaemon/dashboards/Main.dash b/appdaemon/dashboards/Main.dash index 0528fe5..dd6ba51 100644 --- a/appdaemon/dashboards/Main.dash +++ b/appdaemon/dashboards/Main.dash @@ -3,8 +3,8 @@ title: Home widget_dimensions: [120, 120] widget_size: [1, 1] widget_margins: [5, 5] -#columns: 10 -#rows: 6 +columns: 4 +rows: 4 global_parameters: use_comma: 0 precision: 0 @@ -17,6 +17,18 @@ nav_weather: icon_inactive: mdi-arrow-right-bold-outline widget_style: "background: MEDIUMSLATEBLUE;" +nav_desk: + widget_type: navigate + dashboard: Desk + icon_inactive: mdi-desk-lamp + widget_style: "background: MEDIUMSLATEBLUE;" + +nav_status: + widget_type: navigate + dashboard: Status + icon_inactive: mdi-router-wireless-settings + widget_style: "background: MEDIUMSLATEBLUE;" + # Widgets current_weather: widget_type: weather @@ -45,3 +57,4 @@ layout: - include: header - nav_main, clock(2x1), reload - current_weather(3x1), nav_weather + - nav_desk, spacer(2x1), nav_status diff --git a/appdaemon/dashboards/Status.dash b/appdaemon/dashboards/Status.dash new file mode 100644 index 0000000..b4a9b49 --- /dev/null +++ b/appdaemon/dashboards/Status.dash @@ -0,0 +1,27 @@ +# Dashboard Config +title: Status +widget_dimensions: [120, 120] +widget_size: [1, 1] +widget_margins: [5, 5] +columns: 4 +rows: 4 +global_parameters: + use_comma: 0 + precision: 2 + use_hass_icon: 1 + shorten: 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: status + - ac_status, ac_current, ac_voltage + - battery_status, battery_capacity, battery_voltage, battery_current + - battery_health(4x1) diff --git a/appdaemon/dashboards/header.yaml b/appdaemon/dashboards/header.yaml index 635af6a..53cb807 100644 --- a/appdaemon/dashboards/header.yaml +++ b/appdaemon/dashboards/header.yaml @@ -14,3 +14,7 @@ clock: widget_type: clock time_format: 24hr widget_style: "background: DARKSLATEBLUE;" + +spacer: + widget_type: label + widget_style: "background: DARKSLATEBLUE;" diff --git a/appdaemon/dashboards/status.yaml b/appdaemon/dashboards/status.yaml new file mode 100644 index 0000000..0b8e914 --- /dev/null +++ b/appdaemon/dashboards/status.yaml @@ -0,0 +1,55 @@ +ac_status: + widget_type: icon + entity: sensor.sopine_ac_present + icons: + "True": + icon: mdi-power-plug + "False": + icon: mdi-power-plug-off + +ac_current: + widget_type: sensor + entity: sensor.sopine_ac_current + units: "A" + +ac_voltage: + widget_type: sensor + entity: sensor.sopine_ac_voltage + units: "V" + +battery_status: + widget_type: icon + entity: sensor.sopine_battery_status + icons: + "Charging": + icon: mdi-battery-charging + "Discharging": + icon: mdi-battery-50 + "None": + icon: mdi-battery-alert + "default": + icon: mdi-battery-unknown + +battery_capacity: + widget_type: gauge + entity: sensor.sopine_battery_capacity + units: "%" + min: 0 + max: 100 + +battery_voltage: + widget_type: gauge + entity: sensor.sopine_battery_voltage + units: "V" + min: 2.5 + max: 4.75 + +battery_current: + widget_type: sensor + entity: sensor.sopine_battery_current + units: "A" + +battery_health: + widget_type: sensor + entity: sensor.sopine_battery_health + units: ""