+ ${this.makeDropdown("Button type","button_type",i)} + ${this.makeDropdown("Optional - Entity","entity",n,r)} +
+
diff --git a/config/automation/away.yaml b/config/automation/away.yaml index 886e0d9c..f4f440f2 100755 --- a/config/automation/away.yaml +++ b/config/automation/away.yaml @@ -1,41 +1,32 @@ ###################################################################### ## Shut it all down. No one is here +# @CCOSTAN +# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig ###################################################################### # Define an alias for this automation - alias: 'Away Mode' - # Give the automation a unique ID id: 712e845a-9d72-4993-b8af-890b167c807b - # Set the mode to "single" mode: single - # Set the trigger for the automation trigger: - # The automation will also be triggered when the state of the "group.family" entity changes to "not_home" - platform: state entity_id: group.family to: 'not_home' - # Set the conditions for the automation to run condition: - # The automation will only run if the state of the "group.family" entity is "not_home" - condition: state entity_id: group.family state: 'not_home' - # The automation will also only run if the state of the "input_boolean.guest_mode" entity is "off" + - condition: state entity_id: input_boolean.guest_mode state: 'off' - # Set the actions to be performed by the automation action: - # Lock the front door - service: lock.lock entity_id: lock.front_door - - # Turn off all interior lights and devices - - service: script.interior_off - # Turn off the back landscaping lights + - service: script.interior_off - service: switch.turn_off entity_id: switch.back_landscaping diff --git a/config/automation/late_night_helper.yaml b/config/automation/late_night_helper.yaml index 5d30afa9..683e2897 100755 --- a/config/automation/late_night_helper.yaml +++ b/config/automation/late_night_helper.yaml @@ -38,6 +38,7 @@ entity_id: - group.kitchen_Accents - switch.front_office_lamp + - switch.living_room_outlet - delay: '00:05:00' - service: light.turn_off entity_id: diff --git a/config/group/Indoor_Outdoor.yaml b/config/group/Indoor_Outdoor.yaml index 2c4ca4f6..6a749c84 100755 --- a/config/group/Indoor_Outdoor.yaml +++ b/config/group/Indoor_Outdoor.yaml @@ -4,7 +4,8 @@ Interior_Lights: - group.kitchen_accents - light.bedroom - light.bedroom_lights - - light.den_lights + - light.den_2 + - light.den1 - light.dinette_lights - light.dining_room_lights - light.foyer_lights diff --git a/config/packages/phynplus.yaml b/config/packages/phynplus.yaml index cd2ca7e1..4f667627 100755 --- a/config/packages/phynplus.yaml +++ b/config/packages/phynplus.yaml @@ -19,6 +19,11 @@ automation: entity_id: switch.phyn_shutoff_valve to: 'off' + condition: + - condition: time + after: '05:00' + before: '04:00' + action: - service: script.notify_engine_two_button data: diff --git a/config/script/interior_off.yaml b/config/script/interior_off.yaml index c1169ffe..2f247cb6 100755 --- a/config/script/interior_off.yaml +++ b/config/script/interior_off.yaml @@ -10,7 +10,8 @@ interior_off: - service: homeassistant.turn_off entity_id: - group.interior_lights - - service: script.switch_turn_off_all + - group.interior_switches + - switch.lr_amp - service: script.paige_lights_off # C by GE Lights (https://amzn.to/30w3UWy) - service: script.garage_lights_off # C by GE Lights (https://amzn.to/30w3UWy) # - service: script.noon_lights_off # Noon Home Smart Lights (https://amzn.to/3fOIPx6) diff --git a/config/script/notify_engine.yaml b/config/script/notify_engine.yaml index eb188c1c..d34ef12c 100755 --- a/config/script/notify_engine.yaml +++ b/config/script/notify_engine.yaml @@ -56,7 +56,7 @@ notify_engine: group: "{{ group|default('information'),true }}" push: interuption_level: "{{ level|default('active'),true }}" - entity_id: "{{ camera_entity }}" + entity_id: "{{ camera_entity|default('', true) }}" notify_engine_two_button: sequence: diff --git a/config/script/switch_turn_off_all.yaml b/config/script/switch_turn_off_all.yaml deleted file mode 100755 index 6d95a7e4..00000000 --- a/config/script/switch_turn_off_all.yaml +++ /dev/null @@ -1,13 +0,0 @@ -###################################################################################################### -###Script to shut switches with a 30 second delay to not trample codes -### Sample Call -# action: -# - service: script.switch_turn_off_all -###################################################################################################### - -switch_turn_off_all: - sequence: - - service: switch.turn_off - entity_id: group.interior_switches - - service: switch.turn_off - entity_id: switch.lr_amp diff --git a/config/www/community/Bubble-Card/bubble-card.js b/config/www/community/Bubble-Card/bubble-card.js new file mode 100644 index 00000000..920c205d --- /dev/null +++ b/config/www/community/Bubble-Card/bubble-card.js @@ -0,0 +1,1441 @@ +(()=>{"use strict";var __webpack_modules__={946:(e,t,n)=>{function o(e,t=40){if(Array.isArray(e)&&3===e.length){for(let t=0;t<3;t++)if(e[t]<0||e[t]>255)return;return e.every((e=>Math.abs(e-255)<=t))}}let a;function i(e,t,n=1){if(e.startsWith("#"))if(4===e.length){let o=Math.min(255,parseInt(e.charAt(1).repeat(2),16)*n),i=Math.min(255,parseInt(e.charAt(2).repeat(2),16)*n),r=Math.min(255,parseInt(e.charAt(3).repeat(2),16)*n);a="rgba("+o+", "+i+", "+r+", "+t+")"}else{let o=Math.min(255,parseInt(e.slice(1,3),16)*n),i=Math.min(255,parseInt(e.slice(3,5),16)*n),r=Math.min(255,parseInt(e.slice(5,7),16)*n);a="rgba("+o+", "+i+", "+r+", "+t+")"}else if(e.startsWith("rgb")){let o=e.match(/\d+/g);a="rgba("+Math.min(255,o[0]*n)+", "+Math.min(255,o[1]*n)+", "+Math.min(255,o[2]*n)+", "+t+")"}else if(e.startsWith("var(--")){let o=e.slice(4,-1),r=window.getComputedStyle(document.documentElement).getPropertyValue(o);(r.startsWith("#")||r.startsWith("rgb"))&&(a=i(r,t,n))}return a}n.d(t,{_k:()=>i,wW:()=>o})},191:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{BX:()=>fireEvent,GP:()=>applyScrollingEffect,IL:()=>getAttribute,Jn:()=>tapFeedback,OC:()=>isEntityType,P2:()=>throttle,Vv:()=>isColorLight,X:()=>getWeatherIcon,az:()=>createElement,gJ:()=>getImage,jk:()=>forwardHaptic,jx:()=>setLayout,mk:()=>getIconColor,o0:()=>formatDateTime,oY:()=>getName,pr:()=>isStateOn,q7:()=>getIcon,y0:()=>getState});var _style_ts__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(946);function hasStateChanged(e,t,n){if(e.hasState=t.states[n],e.hasState)return e.newState=[e.hasState.state,e.hasState.attributes.rgb_color],e.oldState&&e.newState[0]===e.oldState[0]&&e.newState[1]===e.oldState[1]?e.stateChanged=!1:(e.oldState=e.newState,e.stateChanged=!0),e.stateChanged}function configChanged(e,t){return!(!t.classList.contains("editor")||e.config===e.previousConfig||(e.previousConfig=e.config,0))}const fireEvent=(e,t,n,o)=>{o=o||{},n=null==n?{}:n;const a=new Event(t,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return a.detail=n,e.dispatchEvent(a),a},forwardHaptic=e=>{fireEvent(window,"haptic",e)},navigate=(e,t,n=!1)=>{n?history.replaceState(null,"",t):history.pushState(null,"",t),fireEvent(window,"location-changed",{replace:n})};function toggleEntity(e,t){e.callService("homeassistant","toggle",{entity_id:t})}function tapFeedback(e){void 0!==e&&(e.style.display="",e.style.animation="tap-feedback .3s",setTimeout((()=>{e.style.animation="none",e.style.display="none"}),500))}function getIcon(e,t=e.config.entity,n=e.config.icon){const o=t?.split(".")[0],a=getAttribute(e,"device_class",t),i=getAttribute(e,"icon",t),r=n,s=getState(e,t),l={alarm_control_panel:"mdi:shield",alert:"mdi:alert",automation:"mdi:playlist-play",binary_sensor:function(){const n="off"===s;switch(getAttribute(e,"device_class",t)){case"battery":return n?"mdi:battery":"mdi:battery-outline";case"battery_charging":return n?"mdi:battery":"mdi:battery-charging";case"cold":return n?"mdi:thermometer":"mdi:snowflake";case"connectivity":return n?"mdi:server-network-off":"mdi:server-network";case"door":return n?"mdi:door-closed":"mdi:door-open";case"garage_door":return n?"mdi:garage":"mdi:garage-open";case"heat":return n?"mdi:thermometer":"mdi:fire";case"light":return n?"mdi:brightness-5":"mdi:brightness-7";case"lock":return n?"mdi:lock":"mdi:lock-open";case"moisture":return n?"mdi:water-off":"mdi:water";case"motion":return n?"mdi:motion-sensor-off":"mdi:motion-sensor";case"occupancy":case"presence":return n?"mdi:home-outline":"mdi:home";case"opening":return n?"mdi:square":"mdi:square-outline";case"plug":case"power":return n?"mdi:power-plug-off":"mdi:power-plug";case"running":return n?"mdi:stop":"mdi:play";case"safety":case"tamper":return n?"mdi:check-circle":"mdi:alert-circle";case"smoke":return n?"mdi:check-circle":"mdi:smoke";case"sound":return n?"mdi:music-note-off":"mdi:music-note";case"update":return n?"mdi:package":"mdi:package-up";case"vibration":return n?"mdi:crop-portrait":"mdi:vibrate";case"window":return n?"mdi:window-closed":"mdi:window-open";default:return n?"mdi:radiobox-blank":"mdi:checkbox-marked-circle"}}(),calendar:"mdi:calendar",camera:"mdi:video",climate:"mdi:thermostat",configurator:"mdi:settings",conversation:"mdi:text-to-speech",cover:function(){const n="closed"!==s;switch(getAttribute(e,"device_class",t)){case"awning":return n?"mdi:awning-outline":"mdi:awning";case"blind":return n?"mdi:blinds-open":"mdi:blinds";case"curtain":return n?"mdi:curtains-open":"mdi:curtains";case"damper":case"shutter":default:return n?"mdi:window-shutter-open":"mdi:window-shutter";case"door":return n?"mdi:door-open":"mdi:door-closed";case"garage":return n?"mdi:garage-open":"mdi:garage";case"gate":return n?"mdi:gate-open":"mdi:gate";case"shade":return n?"mdi:roller-shade":"mdi:roller-shade-closed";case"window":return n?"mdi:window-open":"mdi:window-closed"}}(),device_tracker:"mdi:account",fan:"mdi:fan",group:"mdi:google-circles-communities",history_graph:"mdi:chart-line",homeassistant:"mdi:home-assistant",homekit:"mdi:home-automation",image_processing:"mdi:image-filter-frames",input_boolean:"mdi:drawing",input_datetime:"mdi:calendar-clock",input_number:"mdi:ray-vertex",input_select:"mdi:format-list-bulleted",input_text:"mdi:textbox",light:"mdi:lightbulb",lock:"mdi:lock",mailbox:"mdi:mailbox",media_player:"mdi:speaker",mower:"mdi:robot-mower",notify:"mdi:comment-alert",person:"mdi:account",plant:"mdi:flower",proximity:"mdi:apple-safari",remote:"mdi:remote",scene:"mdi:palette",script:"mdi:file-document",sensor:function(){switch(getAttribute(e,"device_class",t)){case"battery":return 100==s?"mdi:battery":s>=90?"mdi:battery-90":s>=80?"mdi:battery-80":s>=70?"mdi:battery-70":s>=60?"mdi:battery-60":s>=50?"mdi:battery-50":s>=40?"mdi:battery-40":s>=30?"mdi:battery-30":s>=20?"mdi:battery-20":s>=10?"mdi:battery-10":"mdi:battery-alert";case"humidity":return"mdi:water-percent";case"illuminance":return"mdi:brightness-5";case"temperature":return"mdi:thermometer";case"pressure":return"mdi:gauge";case"power":return"mdi:flash";case"signal_strength":return"mdi:wifi";case"energy":return"mdi:lightning-bolt";default:return"mdi:eye"}}(),simple_alarm:"mdi:bell",sun:"mdi:white-balance-sunny",switch:"mdi:flash",timer:"mdi:timer",updater:"mdi:cloud-upload",vacuum:"mdi:robot-vacuum",water_heater:"mdi:thermometer",weather:function(n=getState(e,t)){switch(n){case"cloudy":default:return"mdi:weather-cloudy";case"partlycloudy":return"mdi:weather-partly-cloudy";case"rainy":return"mdi:weather-rainy";case"snowy":return"mdi:weather-snowy";case"sunny":return"mdi:weather-sunny";case"clear-night":return"mdi:weather-night";case"fog":return"mdi:weather-fog";case"hail":return"mdi:weather-hail";case"lightning":return"mdi:weather-lightning";case"lightning-rainy":return"mdi:weather-lightning-rainy";case"pouring":return"mdi:weather-pouring";case"windy":return"mdi:weather-windy";case"windy-variant":return"mdi:weather-windy-variant";case"exceptional":return"mdi:alert-circle-outline"}}(),weblink:"mdi:open-in-new"};return r||i||(l[o]?l[o]:l[a]?l[a]:"")}function getWeatherIcon(e){switch(e){case"cloudy":default:return"mdi:weather-cloudy";case"partlycloudy":return"mdi:weather-partly-cloudy";case"rainy":return"mdi:weather-rainy";case"snowy":return"mdi:weather-snowy";case"sunny":return"mdi:weather-sunny";case"clear-night":return"mdi:weather-night";case"fog":return"mdi:weather-fog";case"hail":return"mdi:weather-hail";case"lightning":return"mdi:weather-lightning";case"lightning-rainy":return"mdi:weather-lightning-rainy";case"pouring":return"mdi:weather-pouring";case"windy":return"mdi:weather-windy";case"windy-variant":return"mdi:weather-windy-variant";case"exceptional":return"mdi:alert-circle-outline"}}let cachedColor=null,cachedResult=null;function resolveCssVariable(e){const t=getComputedStyle(document.body);let n=e;for(;n.startsWith("var(");){const e=n.match(/var\((--[^,]+),?\s*(.*)?\)/);if(!e)break;const o=t.getPropertyValue(e[1]).trim();if(o)n=o;else{if(!e[2])break;n=e[2].trim()}}return n}function isColorLight(e){const t=resolveCssVariable(e);if(!t)return!1;if(t===cachedColor)return cachedResult;cachedColor=t;const n=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);let o,a,i;if(n)o=parseInt(n[1],16),a=parseInt(n[2],16),i=parseInt(n[3],16);else{const e=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)/i);if(!e)return cachedResult=!1,cachedResult;o=parseInt(e[1],10),a=parseInt(e[2],10),i=parseInt(e[3],10)}return cachedResult=(.2126*o+.7152*a+.0722*i)/255>.5,cachedResult}function getIconColor(e,t=e.config.entity,n=1){const o=e.config.card_type,a=e.config.use_accent_color,i="var(--bubble-accent-color, var(--accent-color))",r=getAttribute(e,"rgb_color",t),s=isColorLight("var(--bubble-button-icon-background-color, var(--bubble-icon-background-color, var(--bubble-secondary-background-color, var(--card-background-color, var(--ha-card-background)))))");if(n=s?n-.2:n,!t)return i;if(isEntityType(e,"light")&&!a?"button"===o?e.card.classList.add("is-light"):"pop-up"===o&&e.elements.headerContainer.classList.add("is-light"):"button"===o?e.card.classList.remove("is-light"):"pop-up"===o&&e.elements.headerContainer.classList.remove("is-light"),!1===t.startsWith("light.")||a)return i;const l=[225,225,210];if(!r)return`var(--bubble-light-color, rgba(${l.map((e=>Math.min(255,e*n))).join(", ")}))`;const c=r.map((e=>Math.min(255,e*n)));return(0,_style_ts__WEBPACK_IMPORTED_MODULE_0__.wW)(r)?`var(--bubble-light-color, rgba(${l.map((e=>Math.min(255,e*n))).join(", ")}))`:`var(--bubble-light-color, rgba(${c.join(", ")}))`}function getImage(e,t=e.config.entity){if(e.config.force_icon)return"";const n=e._hass.states[t],o=n.attributes.entity_picture_local||n.attributes.entity_picture;return o?e._hass.hassUrl(o):""}function getName(e){const t=e.config.name,n=getAttribute(e,"friendly_name");return e.name||t||n||""}function getState(e,t=e.config.entity){return e._hass.states[t]?.state??""}function getAttribute(context,attribute,entity=context.config.entity){return attribute?eval(`context._hass.states['${entity}']?.attributes.${attribute}`)??"":""}function isEntityType(e,t){return e.config.entity?.startsWith(t+".")??!1}function isStateOn(e,t=e.config.entity){const n=getState(e,t).toLowerCase(),o=Number(n);return!!(["on","open","opening","closing","cleaning","true","idle","home","playing","paused","locked","occupied","available","running","active","connected","online","mowing","starting","heat","cool","dry","heat_cool","fan_only","auto","alarm"].includes(n)||o>0)}function createElement(e,t=""){const n=document.createElement(e);return""!==t&&t.split(" ").forEach((e=>{n.classList.add(e)})),n}function debounce(e,t){let n;return function(...o){clearTimeout(n),n=setTimeout((()=>e.apply(this,o)),t)}}function applyScrollingEffect(e,t,n){const o=e.config.scrolling_effect??!0;if(!o)return void applyNonScrollingStyle(t,n);if(t.previousText===n)return;const a=t.className.split(" ").find((e=>e.startsWith("bubble-")));function i(){t.innerHTML=`
input_boolean
) and trigger its opening/closing in an automation.
+ Optional - Backdrop blur
just below, but be aware that this can slow down your dashboard when opening pop-ups. It is now set to 0 for that reason.navigate
action, or with the horizontal buttons stack that is included.
+ input_select
, select
entities, and
+ any other entities that have attribute lists like
+ source_list
, sound_mode_list
,
+ hvac_modes
, fan_modes
,
+ swing_modes
, preset_modes
, or
+ effect_list
.
+ The Bubble Card ${e} changelog is available here.
+If you have an issue or a question you can find more details in the GitHub documentation. You can also find useful resources and help in these links.
+ +I dedicate most of my spare time to making this project the best it can be. So if you appreciate my work, any donation would be a great way to show your support.
+ +Looking for more advanced examples? Check out my Patreon for exclusive custom styles and templates!
+ +Thank you! 🍻
+ ${this.makeVersion()} +data:
to your service.input_select
, select
entities, and
+ any other entities that have attribute lists like
+ source_list
, sound_mode_list
,
+ hvac_modes
, fan_modes
,
+ swing_modes
, preset_modes
, or
+ effect_list
.
+ styles: |
, it will be added automatically. You can also add templates.
+ ${_k.dump(e)}`;return q`
${gk.dump(e)}`;return q`
${fk.dump(e)}`;return q`