commit e86638d38f55fbd72429365a8a3c895133539c31 Author: Jonas Forsberg Date: Sat Jul 23 11:14:56 2022 +0200 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..03cdeec --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +secrets.yaml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7c18531 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +.PHONY: default all ui-minimalist config sensors + +NAMESPACE := home-assistant +POD_ID := $(shell kubectl -n home-assistant get pod --selector=app.kubernetes.io/name=home-assistant --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}") +CONFIG_FILES := configuration.yaml secrets.yaml input_boolean.yaml + +default: all + +all: ui-minimalist config sensors + +config: + for FILE in $(CONFIG_FILES); do \ + kubectl cp $$FILE $(NAMESPACE)/$(POD_ID):/config; \ + done + +ui-minimalist: + kubectl cp ui_lovelace_minimalist $(NAMESPACE)/$(POD_ID):/config; \ + +sensors: + kubectl cp sensors $(NAMESPACE)/$(POD_ID):/config diff --git a/README.md b/README.md new file mode 100644 index 0000000..14ba0b1 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ + +## Integrations: +- Browser Mod +- HACS +- mqtt +- OpenWeatherMap +- UI Lovelace Minimalist diff --git a/configuration.yaml b/configuration.yaml new file mode 100644 index 0000000..bebdcec --- /dev/null +++ b/configuration.yaml @@ -0,0 +1,64 @@ +homeassistant: + name: home + temperature_unit: C + unit_system: metric + currency: SEK + time_zone: Europe/Stockholm + external_url: !secret external_url + latitude: !secret latitude_home + longitude: !secret longitude_home + elevation: !secret elevation_home + +logger: + default: warning + +default_config: +lovelace: + mode: yaml + resources: + - url: /hacsfiles/button-card/button-card.js + type: module + - url: /hacsfiles/mini-media-player/mini-media-player-bundle.js + type: module + - url: /hacsfiles/simple-weather-card/simple-weather-card-bundle.js + type: module + - url: /hacsfiles/light-entity-card/light-entity-card.js + type: module + - url: /hacsfiles/lovelace-auto-entities/auto-entities.js + type: module + - url: /hacsfiles/lovelace-card-mod/card-mod.js + type: module + - url: /hacsfiles/lovelace-slider-entity-row/slider-entity-row.js + type: module + - url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js + type: module + - url: /hacsfiles/my-cards/my-cards.js + type: module + - url: /local/community/my-cards/my-slider.js + type: module + +browser_mod: + +sonos: + media_player: + advertise_addr: !secret sonos_advertise_addr + hosts: !secret sonos_hosts + +tts: + - platform: google_translate + +http: + use_x_forwarded_for: true + trusted_proxies: !secret trusted_proxies + +mqtt: + discovery_prefix: homeassistant + +automation: !include automations.yaml +script: !include scripts.yaml +scene: !include scenes.yaml +input_boolean: !include input_boolean.yaml +sensor: !include_dir_merge_list sensors +frontend: + themes: !include_dir_merge_named themes + diff --git a/input_boolean.yaml b/input_boolean.yaml new file mode 100644 index 0000000..1b95fc2 --- /dev/null +++ b/input_boolean.yaml @@ -0,0 +1,2 @@ +minimalist_dropdown: + initial: True diff --git a/sensors/rfxcom.yaml b/sensors/rfxcom.yaml new file mode 100644 index 0000000..1655301 --- /dev/null +++ b/sensors/rfxcom.yaml @@ -0,0 +1,9 @@ +- platform: mqtt + name: kitchen_temp + state_topic: rfxcom/kitchen + unit_of_measurement: "C" + json_attributes_template: "{{ value_json.status }}" + value_template: "{{ value_json.payload.temperature.value }}" +- platform: mqtt + name: coffee_pot_timer + state_topic: timers/coffee_pot diff --git a/ui_lovelace_minimalist/custom_cards/custom_card_esh_room/custom_card_esh_room.yaml b/ui_lovelace_minimalist/custom_cards/custom_card_esh_room/custom_card_esh_room.yaml new file mode 100644 index 0000000..46a813d --- /dev/null +++ b/ui_lovelace_minimalist/custom_cards/custom_card_esh_room/custom_card_esh_room.yaml @@ -0,0 +1,182 @@ +--- +card_esh_room: + tap_action: + action: "more-info" + color: "var(--google-grey-500)" + show_icon: true + show_name: true + show_label: true + template: + - "ulm_translation_engine" + size: "20px" + variables: + ulm_custom_card_esh_room_light_entity: null + ulm_custom_card_esh_room_climate_entity: null + label: >- + [[[ + if (!entity) { + return "
"; + } else if (entity.state == "on"){ + var bri = Math.round(entity.attributes.brightness / 2.55); + return (bri ? bri + "%" : variables.ulm_translation_state) ; + } else { + return variables.ulm_translation_state; + } + ]]] + styles: + card: + - border-radius: "20px" + - box-shadow: "var(--box-shadow)" + - padding: "12px" + grid: + - grid-template-areas: "'i light' 'n climate' 'l climate'" + - grid-template-columns: "1fr 1fr" + - grid-template-rows: "min-content" + icon: + - color: "rgba(var(--color-theme),0.2)" + img_cell: + - background-color: "rgba(var(--color-theme),0.05)" + - border-radius: "50%" + - place-self: "center" + - width: "42px" + - height: "42px" + name: + - align-self: "end" + - justify-self: "start" + - font-weight: "bold" + - font-size: "14px" + - margin-left: "12px" + - margin-top: >- + [[[ + if (variables.ulm_custom_card_esh_room_light_entity && variables.ulm_custom_card_esh_room_climate_entity) { + return "8px"; + } else if (variables.ulm_custom_card_esh_room_light_entity) { + return "12px"; + } else if (variables.ulm_custom_card_esh_room_climate_entity) { + return "0px"; + } else { + return "12px"; + } + ]]] + label: + - justify-self: "start" + - align-self: "start" + - font-weight: "bolder" + - font-size: "12px" + - filter: "opacity(40%)" + - margin-left: "12px" + - margin-bottom: >- + [[[ + if (variables.ulm_custom_card_esh_room_light_entity && variables.ulm_custom_card_esh_room_climate_entity) { + return "0px"; + } else if (variables.ulm_custom_card_esh_room_light_entity) { + return "3px"; + } else if (variables.ulm_custom_card_esh_room_climate_entity) { + return "0px"; + } else { + return "3px"; + } + ]]] + state: + - justify-self: "start" + - align-self: "start" + - font-weight: "bolder" + - font-size: "12px" + - filter: "opacity(40%)" + - margin-left: "12px" + custom_fields: + light: + - display: > + [[[ + if (variables.ulm_custom_card_esh_room_light_entity) { + return "block"; + } else { + return "none"; + } + ]]] + climate: + - display: > + [[[ + if (variables.ulm_custom_card_esh_room_climate_entity) { + return "block"; + } else { + return "none"; + } + ]]] + custom_fields: + light: + card: + entity: "[[[ return variables.ulm_custom_card_esh_room_light_entity ]]]" + name: "[[[ return name ]]]" + state: + - value: "on" + icon: "mdi:lightbulb" + styles: + icon: + - color: "rgba(var(--color-yellow),1)" + img_cell: + - background-color: "rgba(var(--color-yellow), 0.2)" + - value: "off" + icon: "mdi:lightbulb-off" + tap_action: + action: "toggle" + type: "custom:button-card" + template: "widget_icon" + + climate: + card: + entity: "[[[ return variables.ulm_custom_card_esh_room_climate_entity ]]]" + name: "[[[ return name ]]]" + state: + - value: "auto" + icon: "mdi:autorenew" + styles: + icon: + - color: "rgba(var(--color-green),1)" + img_cell: + - background-color: "rgba(var(--color-green), 0.2)" + - value: "cool" + icon: "mdi:snowflake" + styles: + icon: + - color: "rgba(var(--color-blue),1)" + img_cell: + - background-color: "rgba(var(--color-blue), 0.2)" + - value: "heat" + icon: "mdi:fire" + styles: + icon: + - color: "rgba(var(--color-red),1)" + img_cell: + - background-color: "rgba(var(--color-red), 0.2)" + - value: "dry" + icon: "mdi:water" + styles: + icon: + - color: "rgba(var(--color-yellow),1)" + img_cell: + - background-color: "rgba(var(--color-yellow), 0.2)" + - value: "heat_cool" + icon: "mdi:sun-snowflake" + styles: + icon: + - color: "rgba(var(--color-purple),1)" + img_cell: + - background-color: "rgba(var(--color-purple), 0.2)" + - value: "fan_only" + icon: "mdi:fan" + styles: + icon: + - color: "rgba(var(--color-green),1)" + img_cell: + - background-color: "rgba(var(--color-green), 0.2)" + - value: "off" + icon: "mdi:snowflake-off" + tap_action: + action: "toggle" + type: "custom:button-card" + styles: + card: + - margin-top: "5px" + template: "widget_icon" + diff --git a/ui_lovelace_minimalist/custom_cards/custom_card_esh_welcome/custom_card_esh_welcome.yaml b/ui_lovelace_minimalist/custom_cards/custom_card_esh_welcome/custom_card_esh_welcome.yaml new file mode 100644 index 0000000..0294505 --- /dev/null +++ b/ui_lovelace_minimalist/custom_cards/custom_card_esh_welcome/custom_card_esh_welcome.yaml @@ -0,0 +1,477 @@ +--- +card_esh_welcome: + template: "ulm_language_variables" + variables: + ulm_weather: "[[[ return variables.ulm_weather]]]" + entity_1: + color: > + [[[ + var colors = ['yellow', 'blue', 'red', 'purple','green', 'pink']; + var color = colors[Math.floor(Math.random() * colors.length)]; + return color; + ]]] + entity_2: + color: > + [[[ + var colors = ['yellow', 'blue', 'red', 'purple','green', 'pink']; + var color = colors[Math.floor(Math.random() * colors.length)]; + return color; + ]]] + entity_3: + color: > + [[[ + var colors = ['yellow', 'blue', 'red', 'purple','green', 'pink']; + var color = colors[Math.floor(Math.random() * colors.length)]; + return color; + ]]] + entity_4: + color: > + [[[ + var colors = ['yellow', 'blue', 'red', 'purple','green', 'pink']; + var color = colors[Math.floor(Math.random() * colors.length)]; + return color; + ]]] + entity_5: + color: > + [[[ + var colors = ['yellow', 'blue', 'red', 'purple','green', 'pink']; + var color = colors[Math.floor(Math.random() * colors.length)]; + return color; + ]]] + show_icon: false + show_label: true + show_name: false + styles: + grid: + - grid-template-areas: > + [[[ + if(variables.ulm_card_esh_welcome_collapse && states[variables.ulm_card_esh_welcome_collapse].state == 'on'){ + return "\'item1\' \'item2\' "; + } else { + return "\'item1\' \'item2\' \'item3\'"; + } + ]]] + - grid-template-columns: "1fr" + - grid-template-rows: "min-content min-content" + - row-gap: "0px" + card: + - border-radius: "var(--border-radius)" + - box-shadow: "var(--box-shadow)" + - padding: "10px" + - cursor: "default" + - "--mdc-ripple-press-opacity": 0 # prevent click animation + custom_fields: + item3: + - display: > + [[[ + if(variables.ulm_card_esh_welcome_collapse && states[variables.ulm_card_esh_welcome_collapse].state == 'on'){ + return "none"; + } else { + return "block"; + } + ]]] + item4: + - display: > + [[[ + if(variables.ulm_card_esh_welcome_collapse && states[variables.ulm_card_esh_welcome_collapse].state == 'on'){ + return "none"; + } else { + return "block"; + } + ]]] + custom_fields: + item1: + card: + type: "custom:button-card" + template: "card_esh_welcome_topbar" + variables: + ulm_card_esh_welcome_collapse: "[[[ return variables.ulm_card_esh_welcome_collapse ]]]" + ulm_weather: "[[[ return variables.ulm_weather]]]" + styles: + card: + - border-radius: "none" + - box-shadow: "none" + - padding: "4px" + - margin-left: "relative" + - cursor: "default" + - "--mdc-ripple-press-opacity": 0 # prevent click animation + item2: + card: + type: "custom:button-card" + show_icon: false + show_label: false + show_name: true + show_entity_picture: false + name: | + [[[ + var today = new Date(); + var time = today.getHours() + let welcome = ''; + if (time >= '18'){ + welcome = variables.ulm_evening; + } else if (time >= '12'){ + welcome = variables.ulm_afternoon; + } else if (time >= '5'){ + welcome = variables.ulm_morning; + } else { + welcome = variables.ulm_hello; + } + return welcome + ', ' + '
' + user.name + '!'; + ]]] + styles: + name: + - align-self: "start" + - justify-self: "start" + - font-weight: "bold" + - font-size: "24px" + - margin-left: "16px" + grid: + - grid-template-areas: "'i n' 'i l'" + - grid-template-columns: "min-content auto" + - grid-template-rows: "min-content min-content" + - text-align: "start" + card: + - box-shadow: "none" + - padding-bottom: "8px" + - cursor: "default" + - "--mdc-ripple-press-opacity": 0 # prevent click animation + item3: + card: + type: "custom:button-card" + template: "card_esh_welcome_nav" + styles: + card: + - border-radius: "none" + - box-shadow: "none" + - padding: "4px" + - cursor: "default" + - "--mdc-ripple-press-opacity": 0 # prevent click animation + variables: + entity_1: "[[[ return variables.entity_1 ]]]" + entity_2: "[[[ return variables.entity_2 ]]]" + entity_3: "[[[ return variables.entity_3 ]]]" + entity_4: "[[[ return variables.entity_4 ]]]" + entity_5: "[[[ return variables.entity_5 ]]]" + +card_esh_welcome_title: + tap_action: + action: "none" + show_icon: false + show_label: true + show_name: true + styles: + label: + - justify-self: "start" + - font-weight: "bold" + - font-size: "1rem" + - opacity: "0.4" + name: + - justify-self: "start" + - font-weight: "bold" + - font-size: "20px" + grid: + - grid-template-areas: "'n' 'l'" + - grid-template-columns: "1fr" + - grid-template-rows: "min-content min-content" + card: + - background-color: "rgba(0,0,0,0)" + - box-shadow: "none" + - height: "auto" + - width: "auto" + - margin-top: "-10px" + - margin-left: "16px" + - margin-bottom: "-15px" + - cursor: "default" + - "--mdc-ripple-press-opacity": 0 # prevent click animation + +card_esh_welcome_nav: + show_icon: false + show_name: true + show_label: false + styles: + grid: + - grid-template-areas: | + [[[ + return "'" + [(variables.entity_1?.nav ? 'item1' : ''), + (variables.entity_2?.nav ? 'item2' : ''), + (variables.entity_3?.nav ? 'item3' : ''), + (variables.entity_4?.nav ? 'item4' : ''), + (variables.entity_5?.nav ? 'item5' : '')].join(' ') + "'"; + ]]] + - grid-template-columns: | + [[[ + return [(variables.entity_1?.nav ? '1fr' : ''), + (variables.entity_2?.nav ? '1fr' : ''), + (variables.entity_3?.nav ? '1fr' : ''), + (variables.entity_4?.nav ? '1fr' : ''), + (variables.entity_5?.nav ? '1fr' : '')].join(' '); + ]]] + - grid-template-rows: "min-content" + - justify-items: "center" + card: + - border-radius: "var(--border-radius)" + - box-shadow: "var(--box-shadow)" + - padding: "12px" + - overflow: "visible" + custom_fields: + item1: + card: + type: "custom:button-card" + template: "card_esh_welcome_pill_nav" + variables: + number_of_nav_pills: | + [[[ + return [variables.entity_1?.nav, + variables.entity_2?.nav, + variables.entity_3?.nav, + variables.entity_4?.nav, + variables.entity_5?.nav].filter(el => el !== undefined).length; + ]]] + entity: "[[[ return variables.entity_1; ]]]" + item2: + card: + type: "custom:button-card" + template: "card_esh_welcome_pill_nav" + variables: + number_of_nav_pills: | + [[[ + return [variables.entity_1?.nav, + variables.entity_2?.nav, + variables.entity_3?.nav, + variables.entity_4?.nav, + variables.entity_5?.nav].filter(el => el !== undefined).length; + ]]] + entity: "[[[ return variables.entity_2; ]]]" + item3: + card: + type: "custom:button-card" + template: "card_esh_welcome_pill_nav" + variables: + number_of_nav_pills: | + [[[ + return [variables.entity_1?.nav, + variables.entity_2?.nav, + variables.entity_3?.nav, + variables.entity_4?.nav, + variables.entity_5?.nav].filter(el => el !== undefined).length; + ]]] + entity: "[[[ return variables.entity_3; ]]]" + item4: + card: + type: "custom:button-card" + template: "card_esh_welcome_pill_nav" + variables: + number_of_nav_pills: | + [[[ + return [variables.entity_1?.nav, + variables.entity_2?.nav, + variables.entity_3?.nav, + variables.entity_4?.nav, + variables.entity_5?.nav].filter(el => el !== undefined).length; + ]]] + entity: "[[[ return variables.entity_4; ]]]" + item5: + card: + type: "custom:button-card" + template: "card_esh_welcome_pill_nav" + variables: + number_of_nav_pills: | + [[[ + return [variables.entity_1?.nav, + variables.entity_2?.nav, + variables.entity_3?.nav, + variables.entity_4?.nav, + variables.entity_5?.nav].filter(el => el !== undefined).length; + ]]] + entity: "[[[ return variables.entity_5; ]]]" + +card_esh_welcome_pill_nav: + tap_action: + action: "navigate" + navigation_path: "[[[ return variables.entity?.nav; ]]]" + show_icon: false + show_label: false + show_name: false + state: + - operator: "template" + value: "[[[ return !variables.entity?.nav; ]]]" + styles: + card: + - display: "none" + styles: + grid: + - grid-template-areas: "'item1' 'item2'" + - grid-template-columns: "1fr" + - grid-template-rows: "1fr 1fr" + - row-gap: "12px" + - justify-items: "center" + - column-gap: "auto" + card: + - border-radius: "50px" + - place-self: "center" + - width: "[[[ return (52 * (1+(5-Math.max(variables.number_of_nav_pills, 3))*0.25)) + 'px'; ]]]" + - height: "[[[ return (84 * (1+(5-Math.max(variables.number_of_nav_pills, 3))*0.25)) + 'px'; ]]]" + - box-shadow: > + [[[ + if (hass.themes.darkMode){ + return "0px 2px 4px 0px rgba(0,0,0,0.80)"; + } else { + return "var(--box-shadow)"; + } + ]]] + - "--mdc-ripple-press-opacity": 0.12 # allow click animation + color: "var(--google-grey)" + custom_fields: + item1: + card: + type: "custom:button-card" + tap_action: + action: "navigate" + navigation_path: "[[[ return variables.entity?.nav; ]]]" + show_icon: true + show_label: false + show_name: false + icon: "[[[ return variables.entity?.icon ]]]" + styles: + icon: + - color: "[[[ return `rgba(var(--color-${variables.entity?.color}), 1)`;]]]" + - width: "[[[ return (20 * (1+(5-Math.max(variables.number_of_nav_pills, 3))*0.25)) + 'px'; ]]]" + img_cell: + - background-color: "[[[ return `rgba(var(--color-${variables.entity?.color}), 0.20)`;]]]" + - border-radius: "50%" + - width: "[[[ return (42 * (1+(5-Math.max(variables.number_of_nav_pills, 3))*0.25)) + 'px'; ]]]" + - height: "[[[ return (42 * (1+(5-Math.max(variables.number_of_nav_pills, 3))*0.25)) + 'px'; ]]]" + grid: + - grid-template-areas: "i" + card: + - box-shadow: "none" + - border-radius: "50px" + - padding: "5px" + state: + - value: "on" + styles: + card: + - overflow: "visible" + - box-shadow: | + [[[ + if (hass.themes.darkMode){ + return "0px 2px 4px 0px rgba(0,0,0,0.80)"; + } else { + return "var(--box-shadow)"; + } + ]]] + item2: + card: + type: "custom:button-card" + tap_action: + action: "navigate" + navigation_path: "[[[ return variables.entity?.nav; ]]]" + show_icon: false + show_label: false + name: "[[[ return variables.entity?.name ]]]" + styles: + name: + - font-weight: "bold" + - font-size: "[[[ return (9.5 * (1+(5-Math.max(variables.number_of_nav_pills, 3))*0.25)) + 'px'; ]]]" + - width: "[[[ return (33 * (1+(5-Math.max(variables.number_of_nav_pills, 3))*0.25)) + 'px'; ]]]" + - padding-bottom: "7px" + grid: + - grid-template-areas: "n" + card: + - box-shadow: "none" + - padding: "0px 5px 5px 5px" + - margin-top: "-5px" + - border-radius: "50px" + +card_esh_welcome_topbar: + show_icon: false + show_label: false + show_name: true + styles: + grid: + - grid-template-areas: "'item1 item2 item3'" + - grid-template-columns: "1fr 7fr 1fr" + - grid-template-rows: "min-content" + - justify-items: "center" + card: + - border-radius: "var(--border-radius)" + - box-shadow: "var(--box-shadow)" + - padding: "12px" + - cursor: "default" + - "--mdc-ripple-press-opacity": 0 # prevent click animation + custom_fields: + item1: + card: + type: "custom:button-card" + template: "chips" + tap_action: + action: "call-service" + service: "input_boolean.toggle" + service_data: + entity_id: "[[[ return variables.ulm_card_esh_welcome_collapse ]]]" + show_icon: true + icon: "mdi:chevron-up" + entity: "[[[ return variables.ulm_card_esh_welcome_collapse ]]]" + styles: + grid: + - grid-template-areas: "'i'" + card: + - box-shadow: > + [[[ + if (hass.themes.darkMode){ + return "0px 2px 4px 0px rgba(0,0,0,0.80)"; + } else { + return "var(--box-shadow)"; + } + ]]] + - visibility: "[[[ return variables.ulm_card_esh_welcome_collapse ? 'visible' : 'hidden'; ]]]" + - "--mdc-ripple-press-opacity": 0.12 # allow click animation + state: + - value: "on" + icon: "mdi:chevron-down" + styles: + icon: + - color: "rgb(var(--color-theme))" + item2: + card: + type: "custom:button-card" + template: "chip_weather_date" + variables: + ulm_weather: "[[[ return variables.ulm_weather]]]" + tap_action: + action: "more-info" + entity: "[[[ return variables.ulm_weather]]]" + styles: + card: + - width: "100px" + - box-shadow: > + [[[ + if (hass.themes.darkMode){ + return "0px 2px 4px 0px rgba(0,0,0,0.80)"; + } else { + return "var(--box-shadow)"; + } + ]]] + - "--mdc-ripple-press-opacity": 0.12 # allow click animation + item3: + card: + type: "custom:button-card" + template: "chip_mdi_icon_only" + variables: + ulm_chip_mdi_icon_only_icon: "mdi:cog-outline" + tap_action: + action: "navigate" + navigation_path: "/config/dashboard" + styles: + card: + - align-self: "end" + - box-shadow: > + [[[ + if (hass.themes.darkMode){ + return "0px 2px 4px 0px rgba(0,0,0,0.80)"; + } else { + return "var(--box-shadow)"; + } + ]]] + - "--mdc-ripple-press-opacity": 0.12 # allow click animation + diff --git a/ui_lovelace_minimalist/dashboard/ui-lovelace.yaml b/ui_lovelace_minimalist/dashboard/ui-lovelace.yaml new file mode 100644 index 0000000..773c2d1 --- /dev/null +++ b/ui_lovelace_minimalist/dashboard/ui-lovelace.yaml @@ -0,0 +1,10 @@ +button_card_templates: !include_dir_merge_named "../../custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/" + +title: "Minimalist" +theme: "minimalist-desktop" +background: "var(--background-image)" +views: + - !include views/home.yaml + - !include views/livingroom.yaml + - !include views/laundry.yaml + - !include views/kitchen.yaml diff --git a/ui_lovelace_minimalist/dashboard/views/home.yaml b/ui_lovelace_minimalist/dashboard/views/home.yaml new file mode 100644 index 0000000..5e1ed74 --- /dev/null +++ b/ui_lovelace_minimalist/dashboard/views/home.yaml @@ -0,0 +1,106 @@ +title: "Home" +path: "home" +cards: + - type: "custom:button-card" + template: "card_esh_welcome" + triggers_update: "input_boolean.minimalist_dropdown" + variables: + ulm_card_esh_welcome_collapse: input_boolean.minimalist_dropdown + ulm_weather: "weather.openweathermap" + entity_1: + nav: "house" + icon: "mdi:home" + name: "House" + color: "blue" + entity_2: + nav: "lights" + icon: "mdi:lightbulb" + name: "Lights" + color: "yellow" + entity_3: + nav: "security" + icon: "mdi:shield" + name: Secure + color: "green" + entity_4: + nav: "network" + icon: "mdi:nas" + name: Lab + color: "purple" + entity_5: + nav: "network" + icon: "mdi:flask" + name: Lab + color: "red" + - type: horizontal-stack + cards: + - type: 'custom:button-card' + template: card_person + variables: + ulm_card_person_entity: person.jonas + ulm_card_person_use_entity_picture: true + - type: 'custom:button-card' + template: card_person + variables: + ulm_card_person_entity: person.sara + ulm_card_person_use_entity_picture: true + - type: horizontal-stack + cards: + - type: 'custom:button-card' + template: card_person + variables: + ulm_card_person_entity: person.tyra + ulm_card_person_use_entity_picture: true + - type: 'custom:button-card' + template: card_person + variables: + ulm_card_person_entity: person.iris + ulm_card_person_use_entity_picture: true + - type: 'custom:button-card' + template: card_title + name: Rooms + - type: horizontal-stack + cards: + - type: "custom:button-card" + template: + - card_esh_room + - green_on + name: "Köket" + icon: mdi:countertop-outline + entity: switch.coffee_pot + variables: + ulm_custom_card_esh_room_light_entity: + ulm_custom_card_esh_room_climate_entity: + tap_action: + action: navigate + navigation_path: "kitchen" + label: '[[[ return states["sensor.kitchen_temp"].state + "°C" ]]]' + - type: "custom:button-card" + template: + - card_esh_room + - green_on + name: Vardagsrum + icon: mdi:television + entity: media_player.vardagsrum + tap_action: + action: navigate + navigation_path: "livingroom" + variables: + ulm_custom_card_esh_room_light_entity: light.light_livinroom_1 + ulm_custom_card_esh_room_climate_entity: + - type: horizontal-stack + cards: + - type: "custom:button-card" + template: + - card_esh_room + - blue_on + name: Tvättstuga + entity: switch.dehumidifier + icon: mdi:washing-machine + tap_action: + action: navigate + navigation_path: "laundry" + variables: + ulm_custom_card_esh_room_light_entity: + ulm_custom_card_esh_room_climate_entity: + label: '[[[ return states["sensor.laundry_temperature"].state + "°C" ]]]' diff --git a/ui_lovelace_minimalist/dashboard/views/kitchen.yaml b/ui_lovelace_minimalist/dashboard/views/kitchen.yaml new file mode 100644 index 0000000..0be43cc --- /dev/null +++ b/ui_lovelace_minimalist/dashboard/views/kitchen.yaml @@ -0,0 +1,60 @@ +title: "Köket" +path: "kitchen" +cards: + - type: horizontal-stack + cards: + - type: "custom:button-card" + template: chip_back + variables: + ulm_chip_back_path: home + - type: "custom:button-card" + template: card_title + name: Köket + - type: horizontal-stack + cards: + - type: 'custom:button-card' + template: card_power_outlet + entity: switch.coffee_pot + variables: + ulm_card_power_outlet_icon: 'mdi:coffee-maker' + ulm_card_power_outlet_consumption_sensor: sensor.coffee_pot_power + ulm_card_power_outlet_name: Kaffekanna + - type: 'custom:button-card' + template: card_generic + entity: sensor.coffee_pot_timer + variables: + ulm_card_generic_name: "Timer kaffepanna" + ulm_card_generic_icon: "mdi:av-timer" + + - type: horizontal-stack + cards: + - type: 'custom:button-card' + template: card_graph + entity: sensor.kitchen_temp + variables: + ulm_card_graph_color: "var(--google-green)" + ulm_card_graph_name: Temperatur + ulm_card_graph_entity: sensor.kitchen_temp + ulm_card_graph_type: fill + ulm_card_graph_hours: 24 + - type: 'custom:button-card' + template: card_graph + entity: sensor.coffee_pot_power + variables: + ulm_card_graph_color: "var(--google-red)" + ulm_card_graph_name: Kaffepanna - Watt + ulm_card_graph_entity: sensor.coffee_pot_power + ulm_card_graph_type: fill + ulm_card_graph_hours: 24 + + - type: "custom:button-card" + template: card_media_player + entity: media_player.kok + name: Sonos + variables: + ulm_card_media_player_icon: "mdi:speaker" + ulm_card_media_player_name: Sonos + ulm_card_media_player_enable_art: true + ulm_card_media_player_enable_controls: true + ulm_card_media_player_enable_volume_slider: true + diff --git a/ui_lovelace_minimalist/dashboard/views/laundry.yaml b/ui_lovelace_minimalist/dashboard/views/laundry.yaml new file mode 100644 index 0000000..7d92157 --- /dev/null +++ b/ui_lovelace_minimalist/dashboard/views/laundry.yaml @@ -0,0 +1,84 @@ +title: "Tvättstuga" +path: "laundry" +cards: + - type: horizontal-stack + cards: + - type: "custom:button-card" + template: chip_back + variables: + ulm_chip_back_path: home + - type: "custom:button-card" + template: card_title + name: Tvättstuga + - type: horizontal-stack + cards: + - type: 'custom:button-card' + template: card_power_outlet + variables: + ulm_card_power_outlet_icon: "mdi:air-humidifier" + ulm_card_power_outlet_consumption_sensor: sensor.dehumidifier_power + ulm_card_power_outlet_name: Luftavfuktare + entity: switch.dehumidifier + - type: 'custom:button-card' + template: card_graph + entity: sensor.dehumidifier_power + variables: + ulm_card_graph_color: "var(--google-red)" + ulm_card_graph_name: Watt + ulm_card_graph_entity: sensor.dehumidifier_power + ulm_card_graph_type: fill + ulm_card_graph_hours: 24 + + - type: horizontal-stack + cards: + - type: 'custom:button-card' + template: card_graph + entity: sensor.laundry_temperature + variables: + ulm_card_graph_color: "var(--google-green)" + ulm_card_graph_name: Temperatur + ulm_card_graph_entity: sensor.laundry_temperature + ulm_card_graph_type: fill + ulm_card_graph_hours: 24 + - type: 'custom:button-card' + template: card_graph + entity: sensor.laundry_humidity + variables: + ulm_card_graph_color: "var(--google-blue)" + ulm_card_graph_name: Luftfuktighet + ulm_card_graph_entity: sensor.laundry_humidity + ulm_card_graph_type: fill + ulm_card_graph_hours: 24 + - type: 'custom:button-card' + template: card_title + label: 'Sensors' + - type: horizontal-stack + cards: + - type: 'custom:button-card' + template: card_binary_sensor_alert + variables: + ulm_card_binary_sensor_alert: true + ulm_show_last_changed: true + ulm_card_binary_sensor_alert_name: Läckage + ulm_card_binary_sensor_alert_icon: mdi:water-outline + entity: binary_sensor.inner_storage_water_leak + - type: 'custom:button-card' + template: card_battery + entity: sensor.inner_storage_battery + variables: + ulm_card_battery_charger_type_entity_id: sensor.inner_storage_battery + ulm_card_battery_battery_level_danger: 10 + ulm_card_battery_battery_level_warning: 50 + ulm_card_battery_name: Läcksensor + + - type: horizontal-stack + cards: + - type: 'custom:button-card' + template: card_battery + entity: sensor.laundry_battery + variables: + ulm_card_battery_charger_type_entity_id: sensor.laundry_battery + ulm_card_battery_battery_level_danger: 10 + ulm_card_battery_battery_level_warning: 50 + ulm_card_battery_name: Xiaomi + diff --git a/ui_lovelace_minimalist/dashboard/views/livingroom.yaml b/ui_lovelace_minimalist/dashboard/views/livingroom.yaml new file mode 100644 index 0000000..92ce167 --- /dev/null +++ b/ui_lovelace_minimalist/dashboard/views/livingroom.yaml @@ -0,0 +1,42 @@ +title: "Vardagsrum" +path: "livingroom" +cards: + - type: horizontal-stack + cards: + - type: "custom:button-card" + template: chip_back + variables: + ulm_chip_back_path: home + - type: "custom:button-card" + template: card_title + name: Vardagsrum + - type: horizontal-stack + cards: + - type: "custom:button-card" + template: card_light + entity: light.light_livinroom_1 + variables: + ulm_card_light_name: Lampa + ulm_card_light_enable_collapse: true + ulm_card_light_enable_slider: false + ulm_card_light_enable_color: true + ulm_card_light_force_background_color: true + - type: "custom:button-card" + template: card_media_player + entity: media_player.vardagsrum + name: Sonos + variables: + ulm_card_media_player_name: Sonos + ulm_card_media_player_icon: "mdi:speaker" + ulm_card_media_player_enable_art: true + ulm_card_media_player_enable_controls: true + ulm_card_media_player_enable_volume_slider: true + - type: "custom:button-card" + template: card_media_player + entity: media_player.vardagsrum_2 + name: Chromecast + variables: + ulm_card_media_player_name: Chromecast + ulm_card_media_player_enable_art: true + ulm_card_media_player_enable_controls: true + ulm_card_media_player_enable_volume_slider: false