diff --git a/config/README.md b/config/README.md index 076f9fe..52d583e 100644 --- a/config/README.md +++ b/config/README.md @@ -45,13 +45,13 @@ https://github.com/ngocjohn/hass-config/assets/96962827/acc1a4db-b92e-4ab1-ac9d- - 35,226 + 35,268 34 - 179 + 164 63 54 32 - 1148 + 1071 215 38 diff --git a/config/dashboards/shared/honeycomb/office_mode.yaml b/config/dashboards/shared/honeycomb/office_mode.yaml index 02be6e0..5a00942 100755 --- a/config/dashboards/shared/honeycomb/office_mode.yaml +++ b/config/dashboards/shared/honeycomb/office_mode.yaml @@ -1,36 +1,60 @@ action: fire-dom-event honeycomb_menu: - entity: input_boolean.office_mode - active: true - autoclose: true + autoclose: false + size: 250 buttons: - icon: mdi:keyboard + entity: input_boolean.office_mode + active: '[[[ return entity.state != "off" ]]]' + position: 0 + show: true tap_action: - action: toggle + action: call-service + service: homeassistant.toggle + service_data: + entity_id: entity - icon: mdi:desk-lamp + show: true + position: 1 entity: light.office_led_light_strip - autoclose: false hold_action: more-info tap_action: - action: toggle + action: call-service + service: light.toggle + service_data: - icon: mdi:floor-lamp + show: true + position: 2 entity: light.office_lamp_bulb - autoclose: false - hold_action: more-info tap_action: - action: toggle + action: call-service + service: light.toggle + service_data: + entity_id: entity + hold_action: more-info - icon: mdi:led-strip + show: true + position: 3 entity: light.office_shelf_led - hold_action: false tap_action: - action: toggle + action: call-service + service: light.toggle + service_data: + entity_id: entity + hold_action: more-info - icon: mdi:alarm-light + show: true + position: 4 entity: input_boolean.brma - hold_action: false tap_action: action: toggle - - icon: cil:laptop-mac + service_data: + entity_id: entity + - icon: custom:ios-desktop-computer + show: true + position: 5 entity: switch.macbook - hold_action: false tap_action: action: toggle + service_data: + entity_id: entity diff --git a/config/dashboards/shared/snippets/popup_footer_layout.yaml b/config/dashboards/shared/snippets/popup_footer_layout.yaml index 8c02c48..761c605 100755 --- a/config/dashboards/shared/snippets/popup_footer_layout.yaml +++ b/config/dashboards/shared/snippets/popup_footer_layout.yaml @@ -4,8 +4,8 @@ grid-gap: 2px 1px margin: 0 padding: 0 mediaquery: - '(max-width: 800px)': - grid-template-columns: 1fr + '(max-width: 1441px)': + grid-template-columns: 560px grid-template-rows: auto grid-gap: 2px 1px margin: 0 diff --git a/config/dashboards/shared/snippets/style-section-heading.yaml b/config/dashboards/shared/snippets/style-section-heading.yaml index cd32dd2..13b5649 100644 --- a/config/dashboards/shared/snippets/style-section-heading.yaml +++ b/config/dashboards/shared/snippets/style-section-heading.yaml @@ -24,6 +24,9 @@ style: } @media screen and (max-width: 800px) { .container { - padding: 1rem 4px 0.6rem !important; + padding: 1rem 4px 1.7vw 0 !important; + } + .container .content { + --mdc-icon-size: 14px !important; } } diff --git a/config/dashboards/shared/snippets/style_popup_footer.yaml b/config/dashboards/shared/snippets/style_popup_footer.yaml index 8efbf38..979081f 100755 --- a/config/dashboards/shared/snippets/style_popup_footer.yaml +++ b/config/dashboards/shared/snippets/style_popup_footer.yaml @@ -5,11 +5,7 @@ style: #root > * { margin: 0px !important; } - @media (max-width: 450px), (max-height: 500px) { - #root { - display: block !important; - } - } + hui-entities-card: $: | ha-card { diff --git a/config/dashboards/subviews/github-stats.yaml b/config/dashboards/subviews/github-stats.yaml index b797b60..e70f8d5 100644 --- a/config/dashboards/subviews/github-stats.yaml +++ b/config/dashboards/subviews/github-stats.yaml @@ -192,11 +192,16 @@ sections: state_color: false entities: - entity: sensor.hass_config_stars + secondary_info: last-changed name: Stars - entity: sensor.hass_config_forks name: Forks - entity: sensor.hass_config_watchers name: Watchers + - entity: sensor.hass_config_latest_commit_formatted + secondary_info: last-changed + icon: mdi:source-commit + name: Latest Commit - type: divider - type: custom:multiple-logbook-card card_mod: diff --git a/config/dashboards/templates/button_card_templates/tpl_addons.yaml b/config/dashboards/templates/button_card_templates/tpl_addons.yaml index eedecdc..60f15f8 100644 --- a/config/dashboards/templates/button_card_templates/tpl_addons.yaml +++ b/config/dashboards/templates/button_card_templates/tpl_addons.yaml @@ -26,19 +26,19 @@ addons_base: ]]] tap_action: action: block - double_tap_action: - action: call-service - service: script.backup_addon - service_data: - addon_slug: > - [[[ - return variables.slug_name; - ]]] - version: > - [[[ - return states[variables.ver_ent].state; - ]]] - haptic: success + # double_tap_action: + # action: call-service + # service: script.backup_addon + # service_data: + # addon_slug: > + # [[[ + # return variables.slug_name; + # ]]] + # version: > + # [[[ + # return states[variables.ver_ent].state; + # ]]] + # haptic: success hold_action: action: fire-dom-event browser_mod: diff --git a/config/dashboards/templates/button_card_templates/tpl_base.yaml b/config/dashboards/templates/button_card_templates/tpl_base.yaml index 6ffb3ac..4000b59 100755 --- a/config/dashboards/templates/button_card_templates/tpl_base.yaml +++ b/config/dashboards/templates/button_card_templates/tpl_base.yaml @@ -961,9 +961,9 @@ extra_styles: #img-cell { display: grid; place-self: center; - max-height: 100px !important; - animation: marquee 20s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite; + animation: marquee 20s ease-in-out infinite; animation-direction: alternate-reverse; + max-height: 170px; } #state { @@ -1010,6 +1010,15 @@ extra_styles: place-items: center center; grid-row-gap: 1rem !important; } + #label { + justify-content: center !important; + } + li { + letter-spacing: 2px !important; + font-size: 1.1rem !important; + line-height: normal !important; + padding-left: 2rem !important; + } } @media screen and (max-width: 800px) { #container { @@ -1019,9 +1028,6 @@ extra_styles: #label { display: none; } - #icon { - max-width: 150px !important; - } .realtemp { font-size: 2.3rem; } @@ -1031,6 +1037,11 @@ extra_styles: .degree-symbol { right: auto; } + #img-cell { + animation: none; + max-height: 100px !important; + top: -15%; + } #icon { width: 100%; position: relative; diff --git a/config/dashboards/templates/button_card_templates/tpl_header.yaml b/config/dashboards/templates/button_card_templates/tpl_header.yaml index 0db97a9..db200bd 100644 --- a/config/dashboards/templates/button_card_templates/tpl_header.yaml +++ b/config/dashboards/templates/button_card_templates/tpl_header.yaml @@ -40,6 +40,10 @@ header_clock: - padding: inherit - width: 100% - overflow: visible + - background: none + - --mdc-ripple-color: none + - box-shadow: none + header_weather: template: - extra_styles @@ -124,6 +128,10 @@ header_weather: - padding: 0 - color: rgba(255, 255, 255, 0.6) - overflow: visible; + img-cell: + - max-height: 170px + - top: -10% icon: - - max-width: 200px + - max-width: 150px - width: 100% + - height: auto diff --git a/config/dashboards/templates/streamline-card.yaml b/config/dashboards/templates/streamline-card.yaml index e5d526f..bef0377 100644 --- a/config/dashboards/templates/streamline-card.yaml +++ b/config/dashboards/templates/streamline-card.yaml @@ -300,7 +300,8 @@ grid_samsung: hold_action: !include ../shared/honeycomb/shield.yaml template: - mediaplayer - # PLAYSTATION + +# PLAYSTATION grid_playstation: card: type: custom:button-card @@ -1246,7 +1247,10 @@ github_graph_card: header: hide showCurrentValues: false legendVisible: false + labelsVisible: false defaultTimeRange: 3d + axisAddMarginMin: false + axisAddMarginMax: false tooltip: size: full uiLayout: diff --git a/config/dashboards/views/main.yaml b/config/dashboards/views/main.yaml index 7e444c4..8e1a80c 100755 --- a/config/dashboards/views/main.yaml +++ b/config/dashboards/views/main.yaml @@ -40,7 +40,7 @@ layout: grid-gap: 8px margin: 0 grid-template-columns: 0px 1fr 1fr 0px - grid-template-rows: 0 min-content fit-content(100%) fit-content(100%) fit-content(100%) fit-content(100%) fit-content(100%) fit-content(100%) min-content 0 + grid-template-rows: 0 min-content fit-content(100%) fit-content(100%) fit-content(100%) fit-content(100%) fit-content(100%) fit-content(100%) min-content 1rem grid-template-areas: | ". . . ." ". header header ." diff --git a/config/dashboards/views/system-grid/system-graph.yaml b/config/dashboards/views/system-grid/system-graph.yaml index adb45be..95894e9 100644 --- a/config/dashboards/views/system-grid/system-graph.yaml +++ b/config/dashboards/views/system-grid/system-graph.yaml @@ -21,7 +21,7 @@ defaultTimeRange: 5h defaultTimeOffset: 0 decimation: fast - labelsVisible: true + labelsVisible: false legendVisible: false lineMode: lines lineGraphHeight: 320 @@ -30,6 +30,8 @@ uiLayout: toolbar: top selector: hide + # sticky: top + invertZoom: true tooltip: size: full graphs: @@ -40,12 +42,13 @@ - entity: sensor.home_assistant_* lineMode: lines - type: line + options: + showTimeLabels: false entities: - entity: sensor.*_memory_percent exclude: - entity: sensor.home_assistant_* lineMode: lines - - type: line entities: - entity: sensor.ha_system_cpu_usage diff --git a/config/packages/hassio/hass_system.yaml b/config/packages/hassio/hass_system.yaml index 332bd3f..15dca3a 100644 --- a/config/packages/hassio/hass_system.yaml +++ b/config/packages/hassio/hass_system.yaml @@ -11,17 +11,55 @@ # RECORDER recorder: db_url: !secret mariadb_url + purge_keep_days: 30 + auto_purge: true + auto_repack: true exclude: domains: - alarm_control_panel - button - camera + - media_player + - switch + - light + - sun + - weather + - timer + - update + - device_tracker + - image + entities: + - sensor.time + - sensor.date + - sensor.hassio_addons_use + - sensor.zhimi_mb4_b008_moto_speed_rpm entity_globs: - sensor.*_motor_speed - sensor.browser_* - - light.browser_* - sensor.prague_moon_* - sensor.*_color + - sensor.*_energy + - sensor.*_power + - sensor.*_linkquality + - sensor.*_last_seen + - sensor.home_* + - sensor.kodi_* + - sensor.amg_43_* + - sensor.*_write + - sensor.prague_* + - sensor.*_utilization + - sensor.*_clients + - sensor.*_voltage + - sensor.*_current + - sensor.*_rx + - sensor.*_tx + - sensor.sun_* + - sensor.*_active + - sensor.hacs_* + - sensor.motion_sensor_* + - sensor.*_outage_count + - sensor.*_speed_rpm + logger: default: error diff --git a/config/themes/tablet.yaml b/config/themes/tablet.yaml index 0a85993..c51961e 100644 --- a/config/themes/tablet.yaml +++ b/config/themes/tablet.yaml @@ -257,8 +257,8 @@ tablet: } @media only screen and (max-width: 800px) { #root { - justify-content: center; - gap: 1.5rem !important + justify-content: space-evenly; + //gap: 1.5rem !important } } ################################################# diff --git a/config/www/dashboard-resources/sidebar-divider.js b/config/www/dashboard-resources/sidebar-divider.js index 3fed4f1..ceb9559 100644 --- a/config/www/dashboard-resources/sidebar-divider.js +++ b/config/www/dashboard-resources/sidebar-divider.js @@ -13,6 +13,11 @@ customElements.whenDefined('ha-sidebar').then(() => { const spacer = sidebar.querySelector('.spacer'); const logs = sidebar.querySelector('a[data-panel="config/logs"]'); const supervisor = sidebar.querySelector('a[data-panel="hassio/system/info"]'); + const isReordered = spacer.nextSibling === logs || spacer.nextSibling === supervisor; + if (isReordered) { + console.log('Sidebar items already reordered'); + return; + } if (spacer && logs && supervisor) { // Insert logs after spacer @@ -28,8 +33,13 @@ customElements.whenDefined('ha-sidebar').then(() => { } else { sidebar.appendChild(supervisor); // If no nextSibling, append it to the end } + console.log('Sidebar items reordered successfully'); + } + const isDividerAdded = sidebar.querySelectorAll('div.divider').length > 0; + if (isDividerAdded) { + console.log('Sidebar divider already added'); + return; } - const divider = this.shadowRoot.querySelector('div.divider'); const media = sidebar.querySelector('a[data-panel="media-browser"]'); const addons = sidebar.querySelector('a[data-panel="hassio/dashboard"]'); @@ -44,8 +54,7 @@ customElements.whenDefined('ha-sidebar').then(() => { dividerCopy.appendChild(style); sidebar.insertBefore(dividerCopy.cloneNode(true), addons); sidebar.insertBefore(dividerCopy.cloneNode(true), media); + console.info('Sidebar divider added successfully'); } - - console.info('Sidebar divider added successfully'); }; }); diff --git a/docs/README.md b/docs/README.md index 076f9fe..52d583e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -45,13 +45,13 @@ https://github.com/ngocjohn/hass-config/assets/96962827/acc1a4db-b92e-4ab1-ac9d- - 35,226 + 35,268 34 - 179 + 164 63 54 32 - 1148 + 1071 215 38