├── .gitignore ├── Readme.md ├── automations.yaml ├── configuration.yaml ├── dashboards ├── 0-main.yaml ├── 1-living_room.yaml ├── 13-camera.yaml ├── 14-energy.yaml ├── 15-car.yaml ├── 16-plants.yaml ├── 2-dining_room.yaml ├── 3-salon.yaml ├── 4-office.yaml ├── 5-mbr.yaml ├── 6-bed_room_maxi.yaml ├── 7-bed_room_mini.yaml ├── 8-other.yaml ├── admin │ ├── 1-tsv.yaml │ ├── 2-batterij.yaml │ ├── 3-status.yaml │ ├── 4-solar-settings.yaml │ ├── 5-aircos.yaml │ ├── 99-development.yaml │ └── admin.yaml ├── map │ └── map.yaml ├── resources.yaml └── tsv │ ├── 90-cast-picnic-delivery-eta.yaml │ ├── 91-cast-picnic-order-closing.yaml │ ├── screensaver.yaml │ ├── tsv.yaml │ └── tsv1.yaml ├── images ├── home_pane.gif ├── location.gif ├── settings.gif ├── status.gif └── swiping.gif ├── includes └── googleassistant.yaml ├── packages ├── 0 - Ground floor │ ├── Dining room │ │ ├── lights_dining_room.yaml │ │ └── vacuum.yaml │ ├── Hallway │ │ ├── doorbell.yaml │ │ ├── lights_hallway.yaml │ │ └── wc_beneden.yaml │ ├── Kitchen │ │ └── notification_dishwasher_cheapest_time.yaml │ ├── Livingroom │ │ ├── lights_livingroom.yaml │ │ └── symfonisk.yaml │ ├── Salon │ │ └── lights_salon.yaml │ └── Utility room │ │ └── utility_room.yaml ├── 1 - First floor │ ├── Bedroom mini │ │ ├── minicave.yaml │ │ └── sleep_and_wakeup_light_mini.yaml │ ├── Master bedroom │ │ └── master_bedroom.yaml │ ├── Office │ │ ├── awtrix_ulanzi_tc001.yaml │ │ └── printer.yaml │ └── wc_boven.yaml ├── 2 - Second floor │ └── Bedroom maxi │ │ ├── pubercave.yaml │ │ └── wakeup_light.yaml ├── 3 - Mr │ ├── gas_prices.yaml │ ├── morning_briefing.yaml │ └── travel_time_notifications.yaml ├── 6 - Outside │ ├── air_quality.yaml │ ├── bikeshed.yaml │ ├── ev.yaml │ ├── garden.yaml │ ├── knmi_weeralarm.yaml │ ├── light_frontdoor.yaml │ ├── shed.yaml │ ├── solar.yaml │ └── trash.yaml └── 9 - General │ ├── airco.yaml │ ├── batteries.yaml │ ├── dashboard_helpers.yaml │ ├── google_home_volume.yaml │ ├── kids_notifications.yaml │ ├── kiosk.yaml │ ├── persons.yaml │ ├── picnic.yaml │ ├── postcodeloterij.yaml │ ├── system.yaml │ ├── tts_system.yaml │ ├── ups.yaml │ ├── vacation_mode.yaml │ ├── ventilation.yaml │ └── whose_turn_is_it.yaml ├── scripts.yaml ├── themes └── hmmbob_theme │ └── hmmbob_theme.yaml ├── ui-lovelace.yaml └── www └── icons ├── gft.png ├── oudpapier.png ├── picnic_background.png ├── picnic_background2.png ├── plastic.png ├── plasticpapier.png ├── restafval.png ├── wasmachine-green.jpg └── wasmachine-green.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Example .gitignore file for your config dir. 2 | # A * ensures that everything will be ignored. 3 | * 4 | 5 | # You can allowlist files/folders with !, these will not be ignored. 6 | !*.yaml 7 | !.gitignore 8 | !*.md 9 | !dashboards/ 10 | !dashboards/* 11 | !includes/ 12 | !includes/* 13 | !packages/ 14 | !packages/** 15 | !themes/ 16 | !themes/* 17 | !www/icons/* 18 | 19 | # Ignore folders 20 | .cloud 21 | .storage 22 | .vscode 23 | 24 | # Ensure these files are ignored, otherwise your secret data/credentials will leak. 25 | ip_bans.yaml 26 | secrets.yaml 27 | known_devices.yaml 28 | googleassistant_serviceaccount.json 29 | includes/googleassistant_serviceaccount.json 30 | .google.token 31 | .spotify-token-cache 32 | .sonoff.json 33 | 34 | # Ignore Python cache files 35 | __pycache__/ 36 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | This repo contains my Home Assistant configuration. Home Assistant is open source home automation that puts local control and privacy first. More information can be found at their website, https://www.home-assistant.io. 2 | 3 | I started with Home Assistant back in 2018 somewhere, running it in a [Python venv](https://www.home-assistant.io/installation) directly at a Raspbian installation. I ran into all kind of compatibility issues in the long run, so I decided to switch to a [Docker based setup](https://www.home-assistant.io/installation) in July 2019. Ever since starting with my home automation project, I've been making changes weekly and sometimes daily. However, I don't always commit directly to Github (sorry...) so changes may flow in a bit slower. In April 2020 I completely rebuild my Lovelace setup, and summer 2024 brought a complete new UI setup. 4 | 5 | [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/Gfjz0f2YXJs/0.jpg)](https://www.youtube.com/watch?v=Gfjz0f2YXJs) 6 | 7 | 8 | # My Home Automation Vision 9 | 10 | My vision is that my Home Automation should always work, even when the internet is down and always should have a manual backup. The house should still be fully functional for me, the others living with me but also my non-tech grandma. That results into choosing solutions that don't use cloud services if not necesarry and that all lights still can always be switched manually. 11 | -------------------------------------------------------------------------------- /automations.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # This file is used by the automations editor 3 | # in the Home Assistant frontend. This file must exist 4 | # for the frontend Automation editor to work. 5 | # 6 | # If you are looking for my automations: they are part of packages 7 | # in the packages folder. 8 | [] 9 | -------------------------------------------------------------------------------- /configuration.yaml: -------------------------------------------------------------------------------- 1 | ################################################################# 2 | ## Home Assistant Core 3 | ################################################################# 4 | homeassistant: 5 | auth_providers: 6 | - type: homeassistant 7 | auth_mfa_modules: 8 | - type: totp 9 | name: Authenticator app 10 | - type: notify 11 | message: "Access token: {}" 12 | include: 13 | - mobile_app_sm_a556b 14 | packages: !include_dir_merge_named packages/ 15 | 16 | frontend: 17 | themes: !include_dir_merge_named themes/ 18 | extra_module_url: 19 | - /hacsfiles/lovelace-card-mod/card-mod.js 20 | - /hacsfiles/kiosk-mode/kiosk-mode.js?v1.0.0 21 | 22 | history: 23 | 24 | http: 25 | ip_ban_enabled: true 26 | login_attempts_threshold: 2 27 | use_x_forwarded_for: true 28 | trusted_proxies: !secret http_trusted_proxies 29 | 30 | logbook: 31 | exclude: 32 | entities: 33 | - sensor.kamertemperatuur 34 | entity_globs: 35 | - binary_sensor.pir* 36 | - binary_sensor.sm_a55* 37 | - binary_sensor.sm_a33_* 38 | - binary_sensor.schad* 39 | - number.awtrix_* 40 | - sensor.awtrix* 41 | - sensor.dsmr_* 42 | - sensor.*_last_seen 43 | - sensor.slimme_lezer* 44 | domains: 45 | - automation 46 | - input_boolean 47 | - media_player 48 | 49 | logger: 50 | default: warn 51 | logs: 52 | homeassistant.components.analytics: info # I'd like to see what is sent 53 | filters: 54 | custom_components.hpprinter.managers.rest_api: 55 | - "Error: Cannot connect to host" 56 | custom_components.mitsubishi_wf_rac.wfrac.device: 57 | - "something went wrong updating the airco" 58 | custom_components.xiaomi_miot.fan: 59 | - "Unable to discover the device" 60 | homeassistant.components.goodwe.coordinator: 61 | - "No valid response received even after 10 retries" 62 | homeassistant.components.automation.weerhuisje_update_air_quality_sensors: 63 | - "Timeout" 64 | - "timeout" 65 | homeassistant.helpers.entity: 66 | - "Update of fan.zhimi_cpa4_3bce_air_purifier is taking over 10 seconds" 67 | pychromecast.socket_client: 68 | # Mute cast reconnection warnings/errors 69 | - "Error communicating with socket, resetting connection" 70 | - "Error reading from socket" 71 | - "Failed to connect to service" 72 | - "Heartbeat timeout, resetting connection" 73 | 74 | lovelace: 75 | mode: yaml 76 | resources: !include dashboards/resources.yaml 77 | dashboards: 78 | lovelace-admin: 79 | mode: yaml 80 | filename: dashboards/admin/admin.yaml 81 | title: Admin 82 | icon: mdi:security 83 | show_in_sidebar: true 84 | require_admin: true 85 | lovelace-map: 86 | mode: yaml 87 | filename: dashboards/map/map.yaml 88 | title: Kaart 89 | icon: mdi:map 90 | show_in_sidebar: true 91 | require_admin: false 92 | tsv-dashboards: 93 | mode: yaml 94 | filename: dashboards/tsv/tsv.yaml 95 | title: TSV 96 | icon: mdi:tablet-dashboard 97 | show_in_sidebar: true 98 | require_admin: false 99 | 100 | recorder: 101 | exclude: 102 | domains: 103 | - camera 104 | - media_player 105 | - sun 106 | - update 107 | entity_globs: 108 | - number.alarmspeaker_* 109 | - select.alarmspeaker_* 110 | - sensor.*_geocoded_* 111 | - sensor.*_last_seen 112 | - sensor.*_linkquality 113 | - sensor.*_uptime 114 | - sensor.*_wifi_signaal 115 | - sensor.*_voltage 116 | - sensor.afvalinfo_* 117 | - sensor.alarmspeaker_* 118 | - sensor.dsmr_reading_phase_currently_delivered_l* 119 | - sensor.dsmr_reading_phase_power_current_l* 120 | - sensor.dsmr_reading_phase_voltage_l* 121 | - sensor.on_grid_* 122 | - sensor.pv1_* 123 | - sensor.pv2_* 124 | - sensor.slimmelezer* 125 | - sensor.smartevse_6360_esp* 126 | - sensor.smartevse_6360_evmeter* 127 | - sensor.smartevse_6360_mains* 128 | - sensor.smartevse_mains_* 129 | - sensor.sun_* 130 | - sensor.zonneplan_for* 131 | - switch.alarmspeaker_* 132 | entities: 133 | - automation.stuur_kamertemperatuur_naar_airco_s 134 | - sensor.awtrix_6caff8_current_app 135 | - sensor.awtrix_6caff8_free_ram 136 | - sensor.awtrix_6caff8_wifi_strength 137 | - sensor.droger_dryer_completion_time 138 | - sensor.dsmr_consumption_gas_currently_delivered 139 | - sensor.dsmr_reading_electricity_currently_delivered 140 | - sensor.knmi_all_data 141 | - sensor.smartevse_6360_evchargepower 142 | - sensor.smartevse_6360_evenergycharged 143 | - sensor.smartevse_6360_wifirssi 144 | - sensor.smartevse_total_mains 145 | - sensor.todays_total_production_preserved 146 | 147 | ################################################################# 148 | ## Includes 149 | ################################################################# 150 | automation: !include automations.yaml 151 | google_assistant: !include includes/googleassistant.yaml 152 | script: !include scripts.yaml 153 | 154 | ################################################################# 155 | ## default_config items not included elsewhere 156 | ################################################################# 157 | #default_config: 158 | application_credentials: 159 | backup: 160 | bluetooth: 161 | cloud: 162 | dhcp: 163 | diagnostics: 164 | energy: 165 | go2rtc: 166 | homeassistant_alerts: 167 | media_source: 168 | mobile_app: 169 | my: 170 | ssdp: 171 | stream: 172 | sun: 173 | webhook: 174 | zeroconf: 175 | 176 | ################################################################# 177 | ## Components not using includes 178 | ################################################################# 179 | battery_notes: 180 | battery_increase_threshold: 75 181 | default_battery_low_threshold: 10 182 | round_battery: true 183 | 184 | command_line: 185 | notify: 186 | # Notify bogus service 187 | # Used to let automations not error out 188 | name: bogus 189 | command: ":" # bash no-op command 190 | 191 | sonos: 192 | media_player: 193 | advertise_addr: !secret sonos_host 194 | 195 | notify: 196 | - platform: smtp 197 | name: "Email" 198 | sender: !secret smtp_sender 199 | sender_name: "Homeassistant" 200 | username: !secret smtp_sender 201 | password: !secret smtp_sender_password 202 | recipient: !secret smtp_recipient 203 | server: !secret smtp_server 204 | port: !secret smtp_server_port 205 | encryption: tls 206 | 207 | tts: 208 | - platform: microsoft 209 | api_key: !secret tts_azure_api_key 210 | region: westeurope 211 | language: nl-nl 212 | type: FennaNeural 213 | -------------------------------------------------------------------------------- /dashboards/13-camera.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Camera # 3 | #################### 4 | path: camera 5 | title: Camera 6 | icon: mdi:cctv 7 | cards: 8 | - type: markdown ## Updates header 9 | content: | 10 | # Camera live video 11 | card_mod: 12 | style: 13 | .: | 14 | ha-card { 15 | box-shadow: none; 16 | --ha-card-background: rgba(0, 0, 0, 0.0) 17 | } 18 | ha-markdown$: | 19 | h1 { 20 | font-size: 18px !important; 21 | font-weight: 400 !important; 22 | padding-left: 10px !important; 23 | border-left: 3px solid rgba(81, 134, 236); 24 | } 25 | 26 | - type: grid 27 | columns: 1 28 | square: false 29 | cards: 30 | - type: custom:advanced-camera-card 31 | cameras: 32 | - camera_entity: camera.voordeur_vloeiend 33 | - type: custom:advanced-camera-card 34 | cameras: 35 | - camera_entity: camera.achtertuin_vloeiend 36 | live: 37 | controls: 38 | ptz: 39 | hide_pan_tilt: true 40 | -------------------------------------------------------------------------------- /dashboards/14-energy.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Energy # 3 | #################### 4 | path: energy 5 | title: Energieverbruik 6 | icon: mdi:home-lightning-bolt 7 | cards: 8 | - type: vertical-stack 9 | cards: 10 | - type: markdown ## Energieverbruik header 11 | content: | 12 | # Energie 13 | card_mod: 14 | style: 15 | .: | 16 | ha-card { 17 | box-shadow: none; 18 | --ha-card-background: rgba(0, 0, 0, 0.0) 19 | } 20 | ha-markdown$: | 21 | h1 { 22 | font-size: 18px !important; 23 | font-weight: 400 !important; 24 | padding-left: 10px !important; 25 | border-left: 3px solid rgba(81, 134, 236); 26 | } 27 | 28 | - type: tile 29 | entity: sensor.zonneplan_status_tip 30 | color: green 31 | show_entity_picture: false 32 | icon: mdi:head-lightbulb-outline 33 | name: Zonneplan advies 34 | 35 | - type: custom:mushroom-template-card 36 | primary: "Huidige productie: {{ states('sensor.pv_power')|float(0) }} W" 37 | secondary: "Huidig netverbruik: {{((states('sensor.dsmr_reading_electricity_currently_delivered') | float(0)) * 1000) | round(0, default=0) }} W" 38 | entity: sensor.pv_power 39 | icon: mdi:solar-power 40 | icon_color: green 41 | tap_action: 42 | action: more-info 43 | 44 | - type: energy-distribution 45 | link_dashboard: true 46 | 47 | - type: custom:plotly-graph 48 | title: Electriciteitsprijs 49 | hours_to_show: 18 50 | time_offset: 14h 51 | fn: | 52 | $fn ({ hass, vars }) => { 53 | vars.x = []; vars.y = []; vars.color = []; vars.hover = []; 54 | vars.min = {p: 999,t: null}; vars.max = {p:-999,t:null} 55 | vars.ymin = 999; vars.ymax = -999 56 | vars.p_now = parseFloat(hass.states['sensor.zonneplan_current_electricity_tariff'].state) 57 | vars.unit_of_measurement = hass.states['sensor.zonneplan_current_electricity_tariff'].attributes.unit_of_measurement 58 | hass.states['sensor.zonneplan_current_electricity_tariff']?.attributes?.forecast?.map(e => { 59 | var t = new Date(e.datetime).getTime()+1800000 60 | var p = e.electricity_price/10000000 61 | var c = e.tariff_group.replace("low", "#00a964").replace("normal", "#227153").replace("high","#ed5e18") 62 | if (t>=Date.now()-1800000) { 63 | if (pvars.max.p) vars.max = {p,t,c} 65 | } 66 | if (pvars.ymax) vars.ymax = p 68 | vars.x.push(t) 69 | vars.y.push(p) 70 | vars.color.push(c) 71 | vars.hover.push(String(new Date(t).getHours()).padStart(2,"0") + ":00-" + 72 | String(new Date((new Date(t).getTime()+3600000)).getHours()).padStart(2,"0") + ":00 : " + 73 | p.toFixed(3) + " " + vars.unit_of_measurement) 74 | }) 75 | console.log(vars) 76 | } 77 | layout: 78 | yaxis: 79 | fixedrange: true 80 | tickformat: .2f 81 | range: $fn ({vars}) => [ vars.ymin-0.02, vars.ymax+0.02 ] 82 | xaxis: 83 | tickformat: "%H:%M" 84 | config: 85 | displayModeBar: false 86 | entities: 87 | - entity: "" # Price columns 88 | unit_of_measurement: $ex vars.unit_of_measurement 89 | name: "" 90 | showlegend: false 91 | x: $ex vars.x 92 | "y": $ex vars.y 93 | marker: 94 | color: $ex vars.color 95 | type: bar 96 | hovertemplate: $ex vars.hover 97 | - entity: "" # MIN marker + legend 98 | mode: markers 99 | textposition: top 100 | showlegend: true 101 | name: >- 102 | $fn ({vars}) => vars.min.p.toFixed(3) + " " + vars.unit_of_measurement + " 103 | @ " + new Date(vars.min.t).getHours() + ":00" 104 | yaxis: y0 105 | marker: 106 | symbol: diamond 107 | color: $ex vars.min.c 108 | x: 109 | - $ex vars.min.t 110 | "y": 111 | - $ex vars.min.p 112 | - entity: "" # MAX marker + legend 113 | mode: markers 114 | textposition: top 115 | showlegend: true 116 | name: >- 117 | $fn ({vars}) => vars.max.p.toFixed(3) + " " + vars.unit_of_measurement + " 118 | @ " + new Date(vars.max.t).getHours() + ":00" 119 | yaxis: y0 120 | marker: 121 | symbol: diamond 122 | color: $ex vars.max.c 123 | x: 124 | - $ex vars.max.t 125 | "y": 126 | - $ex vars.max.p 127 | - entity: "" # NOW Line 128 | name: Now 129 | yaxis: y0 130 | showlegend: false 131 | line: 132 | width: 2 133 | dash: dot 134 | color: deepskyblue 135 | x: $ex [Date.now(), Date.now()] 136 | "y": 137 | - 0 138 | - 1 139 | - entity: "" # NOW Legend 140 | yaxis: y0 141 | mode: markers 142 | textposition: top 143 | showlegend: true 144 | name: >- 145 | $fn ({vars}) => "Nu: " + vars.p_now.toFixed(3) + " " + vars.unit_of_measurement 146 | marker: 147 | symbol: diamond 148 | color: deepskyblue 149 | x: $ex [Date.now(), Date.now()] 150 | "y": 151 | - $ex vars.p_now 152 | - entity: sensor.ev_smart_charging_charging # Charging schedule 153 | attribute: charging_schedule 154 | yaxis: y0 155 | name: EV Charging schedule 156 | fill: tozeroy 157 | line: 158 | color: grey 159 | dash: dot 160 | width: 1 161 | filters: 162 | - fn: |- 163 | ({xs, ys, meta, states, statistics, hass, vars}) => { 164 | const forecasts = hass.states['sensor.ev_smart_charging_charging'].attributes.charging_schedule; 165 | res = { 166 | xs: forecasts.map(fc => fc["start"]), 167 | ys: forecasts.map(fc => fc["value"]), 168 | meta: meta 169 | }; 170 | return res; 171 | } 172 | -------------------------------------------------------------------------------- /dashboards/16-plants.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Plants Overview # 3 | #################### 4 | path: plants 5 | title: Plants 6 | icon: mdi:flower 7 | cards: 8 | - type: horizontal-stack 9 | cards: 10 | - type: markdown ## Plants header 11 | content: | 12 | # Planten 13 | card_mod: 14 | style: 15 | .: | 16 | ha-card { 17 | box-shadow: none; 18 | --ha-card-background: rgba(0, 0, 0, 0.0) 19 | } 20 | ha-markdown$: | 21 | h1 { 22 | font-size: 18px !important; 23 | font-weight: 400 !important; 24 | padding-left: 10px !important; 25 | border-left: 3px solid rgba(81, 134, 236); 26 | } 27 | - type: custom:mushroom-chips-card 28 | alignment: end 29 | card_mod: 30 | style: 31 | .: | 32 | ha-card { 33 | margin-top: 10px; 34 | } 35 | chips: 36 | - type: action 37 | icon: mdi:restart 38 | tap_action: 39 | action: perform-action 40 | perform_action: button.press 41 | target: 42 | entity_id: 43 | - button.bt_proxy_1st_floor_restart 44 | - button.bt_proxy_2nd_floor_restart 45 | - button.bt_proxy_ground_floor_restart 46 | 47 | - type: vertical-stack 48 | cards: 49 | - type: custom:flower-card 50 | entity: plant.rubberboom 51 | battery_sensor: sensor.xiaomi_plant_sensor_6_battery 52 | show_bars: 53 | - moisture 54 | - conductivity 55 | - temperature 56 | - illuminance 57 | 58 | - type: custom:flower-card 59 | entity: plant.hangplant 60 | battery_sensor: sensor.xiaomi_plant_sensor_2_battery 61 | show_bars: 62 | - moisture 63 | - conductivity 64 | - temperature 65 | - illuminance 66 | 67 | - type: custom:flower-card 68 | entity: plant.paradijsvogelplant 69 | battery_sensor: sensor.xiaomi_plant_sensor_8_battery 70 | show_bars: 71 | - moisture 72 | - conductivity 73 | - temperature 74 | - illuminance 75 | 76 | - type: custom:flower-card 77 | entity: plant.aglaonema 78 | battery_sensor: sensor.xiaomi_plant_sensor_9_battery 79 | show_bars: 80 | - moisture 81 | - conductivity 82 | - temperature 83 | - illuminance 84 | 85 | - type: custom:flower-card 86 | entity: plant.palm 87 | battery_sensor: sensor.xiaomi_plant_sensor_7_battery 88 | show_bars: 89 | - moisture 90 | - conductivity 91 | - temperature 92 | - illuminance 93 | 94 | - type: custom:flower-card 95 | entity: plant.dracaena 96 | battery_sensor: sensor.xiaomi_plant_sensor_1_battery 97 | show_bars: 98 | - moisture 99 | - conductivity 100 | - temperature 101 | - illuminance 102 | -------------------------------------------------------------------------------- /dashboards/3-salon.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Salon # 3 | #################### 4 | path: salon 5 | title: Salon 6 | icon: mdi:sofa 7 | visible: false 8 | cards: 9 | - type: vertical-stack 10 | cards: 11 | - type: custom:mushroom-title-card 12 | title: Salon 13 | alignment: justify 14 | - type: custom:mushroom-chips-card 15 | chips: 16 | - type: template 17 | tap_action: 18 | action: navigate 19 | navigation_path: /lovelace/start 20 | icon: mdi:arrow-left 21 | - type: entity 22 | entity: sensor.salon_temperatuur 23 | icon_color: orange 24 | - type: entity 25 | entity: sensor.salon_luchtvochtigheid 26 | icon_color: indigo 27 | - type: template 28 | entity: group.lampen_salon 29 | icon: mdi:lightbulb-group 30 | icon_color: |- 31 | {{ "orange" if is_state('group.lampen_salon', 'on') else "grey" }} 32 | content: |- 33 | {{ expand(state_attr('group.lampen_salon', 'entity_id')) | selectattr('state','eq','on') | 34 | map(attribute='entity_id') | list | count }} 35 | - type: template 36 | entity: plant.palm 37 | icon: mdi:sprout 38 | icon_color: |- 39 | {{ "green" if is_state('plant.paradijsvogelplant', 'ok') else "red" }} 40 | tap_action: 41 | action: fire-dom-event 42 | browser_mod: 43 | service: browser_mod.popup 44 | data: 45 | title: Planten eetkamer 46 | content: 47 | type: vertical-stack 48 | cards: 49 | - type: custom:flower-card 50 | entity: plant.paradijsvogelplant 51 | battery_sensor: sensor.xiaomi_plant_sensor_8_battery 52 | show_bars: 53 | - moisture 54 | - conductivity 55 | - temperature 56 | - illuminance 57 | 58 | - type: horizontal-stack 59 | cards: 60 | - type: custom:mushroom-light-card 61 | entity: light.salon 62 | icon: mdi:ceiling-light-multiple 63 | show_brightness_control: true 64 | collapsible_controls: true 65 | - type: custom:mushroom-light-card 66 | entity: light.staande_lamp_switch 67 | icon: mdi:floor-lamp 68 | fill_container: false 69 | show_brightness_control: false 70 | collapsible_controls: true 71 | 72 | - type: horizontal-stack 73 | cards: 74 | - type: custom:mushroom-light-card 75 | entity: switch.grijze_lamp 76 | icon: mdi:lamp 77 | show_brightness_control: false 78 | collapsible_controls: true 79 | - type: custom:mushroom-light-card 80 | entity: light.tv_kastje 81 | icon: mdi:television 82 | fill_container: false 83 | show_brightness_control: false 84 | collapsible_controls: true 85 | 86 | - type: custom:mushroom-template-card 87 | primary: Kacheltje 88 | secondary: >- 89 | {{ state_translated('climate.kacheltje') }} - 90 | Ingesteld op {{ state_attr('climate.kacheltje','heater.target_temperature') }} °C, 91 | momenteel {{ states('sensor.kacheltje_temperature') }} °C 92 | icon: mdi:thermostat 93 | icon_color: |- 94 | {{ "orange" if states('climate.kacheltje') in ['heat','auto'] else "grey" }} 95 | entity: climate.kacheltje 96 | tap_action: 97 | action: more-info 98 | visibility: 99 | - condition: user 100 | users: 101 | - 40059eb4e4d142688185485ed2e1ebbb 102 | - 510b1afef60640d7a220711c50b2192a 103 | 104 | - type: custom:mushroom-template-card 105 | primary: Verwarming salon 106 | secondary: >- 107 | {{ state_translated('climate.salon') }} - 108 | Ingesteld op {{ state_attr('climate.salon','temperature') }} °C, 109 | momenteel {{ states('sensor.salon_temperatuur') |round(1) }} °C 110 | icon: mdi:thermostat 111 | icon_color: |- 112 | {{ "green" if is_state(entity, 'auto') else "orange" if is_state(entity, 'heat') else "grey" }} 113 | entity: climate.salon 114 | tap_action: 115 | action: more-info 116 | visibility: 117 | - condition: user 118 | users: 119 | - 40059eb4e4d142688185485ed2e1ebbb 120 | - 510b1afef60640d7a220711c50b2192a 121 | 122 | - type: custom:mini-media-player 123 | entity: media_player.tv_salon 124 | icon: mdi:cast 125 | artwork: cover 126 | artwork_border: true 127 | power_color: true 128 | scroll_info: true 129 | show_source: true 130 | 131 | - type: custom:mini-media-player 132 | entity: media_player.soundbar 133 | icon: mdi:cast 134 | artwork: cover 135 | artwork_border: true 136 | power_color: true 137 | scroll_info: true 138 | show_source: true 139 | -------------------------------------------------------------------------------- /dashboards/4-office.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Office # 3 | #################### 4 | path: office 5 | title: Kantoor 6 | icon: mdi:chair-school 7 | visible: false 8 | cards: 9 | - type: vertical-stack 10 | cards: 11 | - type: custom:mushroom-title-card 12 | title: Kantoor 13 | alignment: justify 14 | - type: custom:mushroom-chips-card 15 | chips: 16 | - type: template 17 | tap_action: 18 | action: navigate 19 | navigation_path: /lovelace/start 20 | icon: mdi:arrow-left 21 | - type: entity 22 | entity: sensor.xiaomi_temperature_humidity_sensor_2_temperature 23 | icon_color: orange 24 | - type: entity 25 | entity: sensor.xiaomi_temperature_humidity_sensor_2_humidity 26 | icon_color: indigo 27 | 28 | - type: thermostat 29 | entity: climate.kantoor 30 | features: 31 | - type: climate-hvac-modes 32 | hvac_modes: 33 | - "off" 34 | - auto 35 | - heat 36 | 37 | - type: custom:mini-media-player 38 | entity: media_player.kantoor 39 | icon: mdi:cast 40 | artwork: cover 41 | artwork_border: true 42 | power_color: true 43 | scroll_info: true 44 | show_source: true 45 | 46 | - type: heading 47 | heading: Printer 48 | icon: mdi:printer 49 | badges: 50 | - type: entity 51 | entity: sensor.hp_printer_toestand 52 | show_icon: false 53 | - type: entity 54 | entity: sensor.hp_printer_printer_totaal_aantal_zwart_witpagina_s 55 | show_icon: true 56 | - type: entity 57 | entity: sensor.hp_printer_printer_totale_kleurpagina_s 58 | color: blue 59 | icon: mdi:palette 60 | show_icon: true 61 | - type: entity 62 | entity: sensor.hp_printer_scanner_totaal_aantal_pagina_s_van_scannerglas 63 | color: orange 64 | icon: mdi:scanner 65 | show_icon: true 66 | state_content: 67 | - state 68 | - type: vertical-stack 69 | cards: 70 | - type: horizontal-stack 71 | cards: 72 | - type: custom:mushroom-entity-card 73 | entity: sensor.hp_printer_cyan_toner_niveau 74 | icon: mdi:grain 75 | icon_color: cyan 76 | name: Cyan 77 | - type: custom:mushroom-entity-card 78 | entity: sensor.hp_printer_yellow_toner_niveau 79 | icon: mdi:grain 80 | icon_color: yellow 81 | name: Yellow 82 | - type: horizontal-stack 83 | cards: 84 | - type: custom:mushroom-entity-card 85 | entity: sensor.hp_printer_magenta_toner_niveau 86 | icon: mdi:grain 87 | icon_color: purple 88 | name: Magenta 89 | - type: custom:mushroom-entity-card 90 | entity: sensor.hp_printer_black_toner_niveau 91 | icon: mdi:grain 92 | icon_color: black 93 | name: Black 94 | -------------------------------------------------------------------------------- /dashboards/5-mbr.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Master bed room # 3 | #################### 4 | path: mbr 5 | title: master bed room 6 | icon: mdi:bed-double 7 | visible: false 8 | cards: 9 | - type: vertical-stack 10 | cards: 11 | - type: custom:mushroom-title-card 12 | title: Master bed room 13 | alignment: justify 14 | - type: custom:mushroom-chips-card 15 | chips: 16 | - type: template 17 | tap_action: 18 | action: navigate 19 | navigation_path: /lovelace/start 20 | icon: mdi:arrow-left 21 | - type: entity 22 | entity: sensor.xiaomi_temperature_humidity_sensor_5_temperature 23 | icon_color: orange 24 | - type: entity 25 | entity: sensor.xiaomi_temperature_humidity_sensor_5_humidity 26 | icon_color: indigo 27 | - type: template 28 | entity: switch.inloopkast 29 | icon: mdi:lightbulb 30 | icon_color: |- 31 | {{ "orange" if is_state('switch.inloopkast', 'on') else "grey" }} 32 | content: |- 33 | {{ "1" if is_state('switch.inloopkast', 'on') else "0" }} 34 | 35 | - type: thermostat 36 | entity: climate.airco_master_bedroom 37 | features: 38 | - type: climate-hvac-modes 39 | hvac_modes: 40 | - "off" 41 | - auto 42 | - cool 43 | - dry 44 | - heat 45 | - fan_only 46 | 47 | - type: custom:mushroom-template-card 48 | primary: Verwarming MBR 49 | secondary: >- 50 | {{ state_translated('climate.master_bedroom') }} - 51 | Ingesteld op {{ state_attr('climate.master_bedroom','temperature') }} °C, 52 | momenteel {{ states('sensor.master_bedroom_temperatuur') |round(1) }} °C 53 | icon: mdi:thermostat 54 | icon_color: |- 55 | {{ "green" if is_state(entity, 'auto') else "orange" if is_state(entity, 'heat') else "grey" }} 56 | entity: climate.master_bedroom 57 | tap_action: 58 | action: more-info 59 | visibility: 60 | - condition: user 61 | users: 62 | - 40059eb4e4d142688185485ed2e1ebbb 63 | - 510b1afef60640d7a220711c50b2192a 64 | 65 | - type: heading 66 | heading: Luchtreiniger 67 | icon: mdi:air-purifier 68 | badges: 69 | - type: entity 70 | entity: sensor.zhimi_cpa4_3bce_filter_life_level 71 | name: Filter Remaining 72 | show_icon: false 73 | state_content: 74 | - name 75 | - state 76 | 77 | - type: horizontal-stack 78 | cards: 79 | - type: custom:mushroom-fan-card 80 | entity: fan.zhimi_cpa4_3bce_air_purifier 81 | name: Air purifier 82 | icon_animation: true 83 | show_percentage_control: false 84 | layout: horizontal 85 | - type: custom:mushroom-entity-card 86 | entity: sensor.zhimi_cpa4_3bce_pm25_density 87 | name: Air Quality Index 88 | 89 | - type: custom:mini-media-player 90 | entity: media_player.tv_master_bedroom 91 | icon: mdi:cast 92 | artwork: cover 93 | artwork_border: true 94 | power_color: true 95 | scroll_info: true 96 | show_source: true 97 | -------------------------------------------------------------------------------- /dashboards/admin/1-tsv.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Batterij # 3 | #################### 4 | icon: mdi:tablet 5 | title: Panel maintenance 6 | path: panel-maintenance 7 | type: custom:vertical-layout 8 | cards: 9 | - type: markdown ## Kiosk panel maintenance header 10 | content: | 11 | # Kiosk panel maintenance 12 | card_mod: 13 | style: 14 | .: | 15 | ha-card { 16 | margin: 12px 14px -5px 14px; 17 | box-shadow: none; 18 | --ha-card-background: rgba(0, 0, 0, 0.0) 19 | } 20 | ha-markdown$: | 21 | h1 { 22 | font-size: 18px !important; 23 | font-weight: 400 !important; 24 | padding-left: 10px !important; 25 | border-left: 3px solid rgba(81, 134, 236); 26 | } 27 | 28 | - square: false 29 | type: grid 30 | columns: 2 31 | cards: 32 | - type: custom:mushroom-template-card 33 | primary: Hide headers 34 | secondary: All devices 35 | icon: mdi:table-headers-eye 36 | entity: input_boolean.kiosk_hide_header_and_sidebar 37 | icon_color: >- 38 | {{ 'light-green' if 39 | states('input_boolean.kiosk_hide_header_and_sidebar') == 'on' else 40 | 'dark-grey' }} 41 | fill_container: false 42 | 43 | - type: custom:mushroom-template-card 44 | primary: Restart browser 45 | secondary: All devices 46 | icon: mdi:web-refresh 47 | entity: script.kiosk_restart_browser 48 | tap_action: 49 | action: call-service 50 | service: script.kiosk_restart_browser 51 | 52 | - type: custom:auto-entities 53 | card: 54 | type: entities 55 | show_header_toggle: false 56 | state_color: true 57 | filter: 58 | include: 59 | - device: Kiosk1 60 | sort: 61 | method: name 62 | 63 | - type: custom:auto-entities 64 | card: 65 | type: entities 66 | show_header_toggle: false 67 | state_color: true 68 | filter: 69 | include: 70 | - device: Kiosk2 71 | sort: 72 | method: name 73 | -------------------------------------------------------------------------------- /dashboards/admin/2-batterij.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Batterij # 3 | #################### 4 | path: batterij 5 | title: Batterijen 6 | icon: mdi:battery-medium 7 | cards: 8 | - type: vertical-stack 9 | cards: 10 | - type: markdown ## Batterij niveaus header 11 | content: | 12 | # Batterij niveaus 13 | card_mod: 14 | style: 15 | .: | 16 | ha-card { 17 | margin: 12px 14px -5px 14px; 18 | box-shadow: none; 19 | --ha-card-background: rgba(0, 0, 0, 0.0) 20 | } 21 | ha-markdown$: | 22 | h1 { 23 | font-size: 18px !important; 24 | font-weight: 400 !important; 25 | padding-left: 10px !important; 26 | border-left: 3px solid rgba(81, 134, 236); 27 | } 28 | - type: custom:battery-state-card 29 | secondary_info: "{attributes.battery_type_and_quantity}" 30 | round: 0 31 | filter: 32 | include: 33 | - name: entity_id 34 | value: "*_battery_plus" 35 | bulk_rename: 36 | - from: "Batterij+" 37 | sort: 38 | - state 39 | 40 | - type: markdown 41 | title: Battery Summary 42 | content: > 43 | {% set ns_batteries = namespace(batteries={}) %} 44 | 45 | {% for entity_id in integration_entities('battery_notes') if entity_id is 46 | search('_battery_type$', ignorecase=False) -%} 47 | {% set battery_type = states[entity_id].state %} 48 | {% set battery_split = battery_type.split('×') %} 49 | {% if battery_split | length > 1 %} 50 | {% set battery_type = battery_split[-1] | trim %} 51 | {% set battery_count = battery_split[0] | int(1) %} 52 | {% else %} 53 | {% set battery_count = 1 %} 54 | {% endif %} 55 | {% if battery_type not in ns_batteries.batteries %} 56 | {% set ns_batteries.batteries = dict(ns_batteries.batteries, **{battery_type: battery_count}) %} 57 | {% else %} 58 | {% set ns_batteries.batteries = dict(ns_batteries.batteries, **{battery_type: ns_batteries.batteries[battery_type] + battery_count}) %} 59 | {% endif %} 60 | {% endfor %} 61 | 62 | 63 | | Type | Count | 64 | 65 | | :-- | --: | 66 | 67 | {% for bt in ns_batteries.batteries | dictsort(False, 'value') | reverse -%} 68 | | {{ bt[0] }} | {{ [bt][0][1] }} | 69 | {% endfor %} 70 | card_mod: 71 | style: 72 | ha-markdown$: > 73 | table { width: 100%; border-collapse: separate; border-spacing: 0px; } 74 | tbody tr:nth-child(2n+1) { background-color: 75 | var(--table-row-background-color); } thead tr th, tbody tr td {padding: 76 | 4px 10px; } 77 | -------------------------------------------------------------------------------- /dashboards/admin/3-status.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Status # 3 | #################### 4 | path: status 5 | title: Status 6 | icon: mdi:check-network-outline 7 | cards: 8 | - type: vertical-stack 9 | cards: 10 | - type: markdown ## High accuracy header 11 | content: | 12 | # Locatienauwkeurigheid 13 | card_mod: 14 | style: 15 | .: | 16 | ha-card { 17 | margin: 12px 14px -5px 14px; 18 | box-shadow: none; 19 | --ha-card-background: rgba(0, 0, 0, 0.0) 20 | } 21 | ha-markdown$: | 22 | h1 { 23 | font-size: 18px !important; 24 | font-weight: 400 !important; 25 | padding-left: 10px !important; 26 | border-left: 3px solid rgba(81, 134, 236); 27 | } 28 | 29 | - square: false 30 | type: grid 31 | columns: 2 32 | cards: 33 | - type: custom:mushroom-template-card 34 | primary: High accuracy maxi 35 | secondary: "{{states('input_text.naam_puber')}}" 36 | entity: binary_sensor.schaduwspeler_high_accuracy_mode 37 | icon: mdi:crosshairs-gps 38 | icon_color: >- 39 | {{ 'light-green' if states(entity) == 'on' else 'dark-grey' }} 40 | fill_container: false 41 | tap_action: 42 | action: call-service 43 | service: script.high_accuracy_mode 44 | data: 45 | target: notify.mobile_app_schaduwspeler 46 | 47 | - type: custom:mushroom-template-card 48 | primary: High accuracy mini 49 | secondary: "{{states('input_text.naam_mini')}}" 50 | entity: binary_sensor.sm_a236b_high_accuracy_mode 51 | icon: mdi:crosshairs-gps 52 | icon_color: >- 53 | {{ 'light-green' if states(entity) == 'on' else 'dark-grey' }} 54 | tap_action: 55 | action: call-service 56 | service: script.high_accuracy_mode 57 | data: 58 | target: notify.mobile_app_sm_a236b 59 | 60 | - type: markdown ## Statussen header 61 | content: | 62 | # Statussen 63 | card_mod: 64 | style: 65 | .: | 66 | ha-card { 67 | margin: 12px 14px -5px 14px; 68 | box-shadow: none; 69 | --ha-card-background: rgba(0, 0, 0, 0.0) 70 | } 71 | ha-markdown$: | 72 | h1 { 73 | font-size: 18px !important; 74 | font-weight: 400 !important; 75 | padding-left: 10px !important; 76 | border-left: 3px solid rgba(81, 134, 236); 77 | } 78 | 79 | - type: custom:auto-entities 80 | card: 81 | type: entities 82 | show_header_toggle: false 83 | state_color: true 84 | filter: 85 | include: 86 | - attributes: 87 | device_class: connectivity 88 | options: 89 | tap_action: 90 | action: more-info 91 | exclude: 92 | - entity_id: "*rocky*attached*" 93 | sort: 94 | method: name 95 | -------------------------------------------------------------------------------- /dashboards/admin/4-solar-settings.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Solar settings # 3 | #################### 4 | path: solar 5 | title: Solar overview 6 | icon: mdi:solar-power 7 | 8 | cards: 9 | - type: markdown ## Header 10 | content: | 11 | # Solar settings 12 | card_mod: 13 | style: 14 | .: | 15 | ha-card { 16 | margin: 12px 14px -5px 14px; 17 | box-shadow: none; 18 | --ha-card-background: rgba(0, 0, 0, 0.0) 19 | } 20 | ha-markdown$: | 21 | h1 { 22 | font-size: 18px !important; 23 | font-weight: 400 !important; 24 | padding-left: 10px !important; 25 | border-left: 3px solid rgba(81, 134, 236); 26 | } 27 | - type: vertical-stack 28 | cards: 29 | - type: entities 30 | state_color: true 31 | show_header_toggle: false 32 | entities: 33 | - entity: binary_sensor.negatieve_stroomprijs 34 | - entity: number.grid_export_limit 35 | - entity: sensor.pv_power 36 | - type: divider 37 | - entity: input_boolean.solar_pv_off_automatic 38 | name: "Turn off PV automatically when negative prices" 39 | - type: divider 40 | - entity: input_boolean.solar_pv_off_schedule 41 | name: "Enable scheduled turning on/off of solar" 42 | - entity: input_datetime.solar_pv_off_start 43 | name: Start PV off time 44 | - entity: input_datetime.solar_pv_off_end 45 | name: End PV off time 46 | -------------------------------------------------------------------------------- /dashboards/admin/5-aircos.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Airco's # 3 | #################### 4 | path: Airco's 5 | title: Airco' 6 | icon: mdi:snowflake 7 | cards: 8 | - type: markdown ## Airco's header 9 | content: | 10 | # Airco's 11 | card_mod: 12 | style: 13 | .: | 14 | ha-card { 15 | margin: 12px 14px -5px 14px; 16 | box-shadow: none; 17 | --ha-card-background: rgba(0, 0, 0, 0.0) 18 | } 19 | ha-markdown$: | 20 | h1 { 21 | font-size: 18px !important; 22 | font-weight: 400 !important; 23 | padding-left: 10px !important; 24 | border-left: 3px solid rgba(81, 134, 236); 25 | } 26 | 27 | - type: custom:auto-entities 28 | card: 29 | type: entities 30 | show_header_toggle: false 31 | state_color: true 32 | filter: 33 | include: 34 | - device: "Airco woonkamer" 35 | sort: 36 | method: name 37 | 38 | - type: custom:auto-entities 39 | card: 40 | type: entities 41 | show_header_toggle: false 42 | state_color: true 43 | filter: 44 | include: 45 | - device: "Airco master bedroom" 46 | sort: 47 | method: name 48 | 49 | - type: custom:auto-entities 50 | card: 51 | type: entities 52 | show_header_toggle: false 53 | state_color: true 54 | filter: 55 | include: 56 | - device: "Airco slaapkamer T" 57 | sort: 58 | method: name 59 | 60 | - type: custom:auto-entities 61 | card: 62 | type: entities 63 | show_header_toggle: false 64 | state_color: true 65 | filter: 66 | include: 67 | - device: "Airco slaapkamer M" 68 | sort: 69 | method: name 70 | -------------------------------------------------------------------------------- /dashboards/admin/99-development.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Dev Overview # 3 | #################### 4 | 5 | ############################################################################################ 6 | # This file is not part of my regular setup, but still being used in development efforts. # 7 | # It is included just for me, so I can have a quick dev look at some items. # 8 | ############################################################################################ 9 | path: development 10 | title: Development 11 | icon: mdi:magnify 12 | cards: 13 | - type: custom:auto-entities 14 | card: 15 | type: entities 16 | title: Things that might be broken 17 | show_header_toggle: false 18 | filter: 19 | include: 20 | - state: unknown 21 | exclude: 22 | - domain: button 23 | - domain: conversation 24 | - domain: group 25 | - domain: scene 26 | - entity_id: "*picnic*" 27 | - entity_id: "*smarttag*" 28 | - entity_id: "*_action" 29 | sort: 30 | method: name 31 | 32 | - type: entities 33 | title: All Input fields 34 | entities: 35 | - type: custom:auto-entities 36 | card: 37 | type: custom:fold-entity-row 38 | head: 39 | type: section 40 | label: All input booleans 41 | filter: 42 | include: 43 | - entity_id: input_boolean.* 44 | sort: 45 | method: name 46 | - type: custom:auto-entities 47 | card: 48 | type: custom:fold-entity-row 49 | head: 50 | type: section 51 | label: All input date_time 52 | filter: 53 | include: 54 | - entity_id: input_datetime.* 55 | sort: 56 | method: name 57 | - type: custom:auto-entities 58 | card: 59 | type: custom:fold-entity-row 60 | head: 61 | type: section 62 | label: All input numbers 63 | filter: 64 | include: 65 | - entity_id: input_number.* 66 | sort: 67 | method: name 68 | -------------------------------------------------------------------------------- /dashboards/admin/admin.yaml: -------------------------------------------------------------------------------- 1 | title: Admin views 2 | views: 3 | - !include 1-tsv.yaml 4 | - !include 2-batterij.yaml 5 | - !include 3-status.yaml 6 | - !include 4-solar-settings.yaml 7 | - !include 5-aircos.yaml 8 | - !include 99-development.yaml 9 | -------------------------------------------------------------------------------- /dashboards/map/map.yaml: -------------------------------------------------------------------------------- 1 | title: Map 2 | path: map 3 | views: 4 | - title: Map 5 | type: panel 6 | cards: 7 | - type: map 8 | entities: 9 | - entity: person.bob 10 | - entity: !secret person_mw 11 | - entity: !secret person_mini 12 | - entity: !secret person_puber 13 | - entity: zone.breda 14 | - entity: zone.cz 15 | - entity: zone.home 16 | - entity: zone.mc 17 | - entity: zone.school 18 | - entity: zone.scouting 19 | - entity: zone.vkl 20 | - entity: zone.work_ms 21 | default_zoom: 17 22 | hours_to_show: 3 23 | -------------------------------------------------------------------------------- /dashboards/resources.yaml: -------------------------------------------------------------------------------- 1 | - url: /hacsfiles/lovelace-flower-card/flower-card.js 2 | type: module 3 | - url: /hacsfiles/lovelace-fold-entity-row/fold-entity-row.js 4 | type: module 5 | - url: /hacsfiles/hass-swipe-navigation/swipe-navigation.js 6 | type: module 7 | - url: /hacsfiles/mini-media-player/mini-media-player-bundle.js 8 | type: module 9 | - url: /hacsfiles/lovelace-mushroom/mushroom.js 10 | type: module 11 | - url: /hacsfiles/lovelace-plotly-graph-card/plotly-graph-card.js 12 | type: module 13 | - url: /hacsfiles/vertical-stack-in-card/vertical-stack-in-card.js 14 | type: module 15 | - url: /hacsfiles/advanced-camera-card/advanced-camera-card.js 16 | type: module 17 | - url: /hacsfiles/Ultra-Vehicle-Card/ultra-vehicle-card.js 18 | type: module 19 | 20 | ### Admin dashboard only 21 | - url: /hacsfiles/lovelace-auto-entities/auto-entities.js 22 | type: module 23 | - url: /hacsfiles/battery-state-card/battery-state-card.js 24 | type: module 25 | 26 | ### TSV dashboards 27 | - url: https://fonts.googleapis.com/css2?family=Oswald&display=swap 28 | type: css 29 | - url: /hacsfiles/clock-weather-card/clock-weather-card.js 30 | type: module 31 | - url: /hacsfiles/lovelace-layout-card/layout-card.js 32 | type: module 33 | - url: /hacsfiles/lovelace-more-info-card/more-info-card.js 34 | type: module 35 | - url: /hacsfiles/pqina-flip-clock-card/pqina-flip-clock-card.js 36 | type: module 37 | - url: /hacsfiles/swipe-card/swipe-card.js 38 | type: module 39 | - url: /hacsfiles/text-element/text-element.js 40 | type: module 41 | -------------------------------------------------------------------------------- /dashboards/tsv/90-cast-picnic-delivery-eta.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Picnic # 3 | #################### 4 | path: picnic-eta 5 | title: Picnic ETA 6 | icon: mdi:cart 7 | type: panel 8 | cards: 9 | - type: picture-elements 10 | image: local/icons/picnic_background2.png 11 | elements: 12 | - type: custom:text-element 13 | text: "bezorgt tussen" 14 | style: 15 | top: 67% 16 | left: 50% 17 | color: white 18 | font-size: 400% 19 | font-weight: bold 20 | - type: state-label 21 | entity: sensor.picnic_next_delivery_eta_start_time 22 | style: 23 | top: 85% 24 | left: 30% 25 | color: white 26 | font-size: 500% 27 | font-weight: bold 28 | - type: custom:text-element 29 | text: "en" 30 | style: 31 | top: 85% 32 | left: 50% 33 | color: white 34 | font-size: 300% 35 | font-weight: bold 36 | - type: state-label 37 | entity: sensor.picnic_next_delivery_eta_end_time 38 | style: 39 | top: 85% 40 | left: 70% 41 | color: white 42 | font-size: 500% 43 | font-weight: bold 44 | - type: icon 45 | icon: mdi:close-circle 46 | tap_action: 47 | action: navigate 48 | navigation_path: "/tsv-dashboards/tsv1" 49 | style: 50 | top: 10% 51 | left: 90% 52 | color: white 53 | transform: scale(3,3) 54 | -------------------------------------------------------------------------------- /dashboards/tsv/91-cast-picnic-order-closing.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Picnic # 3 | #################### 4 | path: picnic-order-closing 5 | title: Picnic Order window closing 6 | icon: mdi:clock-alert-outline 7 | type: panel 8 | cards: 9 | - type: picture-elements 10 | image: local/icons/picnic_background2.png 11 | elements: 12 | - type: custom:text-element 13 | text: "Bijbestellen kan tot" 14 | style: 15 | top: 67% 16 | left: 50% 17 | color: white 18 | font-size: 300% 19 | font-weight: bold 20 | - type: state-label 21 | entity: sensor.picnic_last_order_max_order_time_only 22 | style: 23 | top: 85% 24 | left: 50% 25 | color: white 26 | font-size: 800% 27 | font-weight: bold 28 | - type: icon 29 | icon: mdi:close-circle 30 | tap_action: 31 | action: navigate 32 | navigation_path: "/tsv-dashboards/tsv1" 33 | style: 34 | top: 10% 35 | left: 90% 36 | color: white 37 | transform: scale(3,3) 38 | -------------------------------------------------------------------------------- /dashboards/tsv/screensaver.yaml: -------------------------------------------------------------------------------- 1 | title: Screensaver 2 | path: screensaver 3 | theme: Hmmbob dark theme 4 | type: panel 5 | 6 | cards: 7 | - type: custom:pqina-flip-clock-card 8 | twentyFourHourFormat: true 9 | hideBackground: true 10 | showSeconds: false 11 | tap_action: 12 | action: navigate 13 | navigation_path: /tsv-dashboards/tsv1 14 | styles: 15 | height: 55cqw 16 | textColor: rgb(255, 255, 255) 17 | font: Oswald 18 | font-size: 38cqw 19 | textOffsetVertical: "-0.05em" 20 | frontFlapColor: rgb(40, 40, 40) 21 | rearFlapColor: rgb(40, 40, 40) 22 | card_mod: 23 | style: | 24 | ha-card { 25 | background-color: transparent; 26 | border-color: transparent; 27 | box-shadow: none; 28 | } 29 | -------------------------------------------------------------------------------- /dashboards/tsv/tsv.yaml: -------------------------------------------------------------------------------- 1 | kiosk_mode: 2 | user_settings: 3 | - users: 4 | - Bob 5 | ignore_entity_settings: true 6 | entity_settings: 7 | - entity: 8 | input_boolean.kiosk_hide_header_and_sidebar: "on" 9 | hide_sidebar: true 10 | hide_header: true 11 | - entity: 12 | input_boolean.kiosk_hide_header_and_sidebar: "off" 13 | hide_sidebar: false 14 | hide_header: false 15 | 16 | title: TSV 1 17 | views: 18 | - !include tsv1.yaml 19 | - !include screensaver.yaml 20 | - !include 90-cast-picnic-delivery-eta.yaml 21 | - !include 91-cast-picnic-order-closing.yaml 22 | -------------------------------------------------------------------------------- /images/home_pane.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/images/home_pane.gif -------------------------------------------------------------------------------- /images/location.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/images/location.gif -------------------------------------------------------------------------------- /images/settings.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/images/settings.gif -------------------------------------------------------------------------------- /images/status.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/images/status.gif -------------------------------------------------------------------------------- /images/swiping.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/images/swiping.gif -------------------------------------------------------------------------------- /includes/googleassistant.yaml: -------------------------------------------------------------------------------- 1 | project_id: !secret google_assistant_project_id 2 | service_account: !include googleassistant_serviceaccount.json 3 | expose_by_default: false 4 | report_state: true 5 | exposed_domains: 6 | - media_player 7 | entity_config: 8 | ## Woonkamer 9 | light.spots_vaas: 10 | name: "Spots vaas" 11 | expose: true 12 | room: "Woonkamer" 13 | light.spots_woonkamer: 14 | name: "Spots woonkamer" 15 | expose: true 16 | room: "Woonkamer" 17 | media_player.sonos_woonkamer: 18 | name: "Sonos woonkamer" 19 | expose: true 20 | room: "Woonkamer" 21 | aliases: 22 | - "Sonos" 23 | sensor.woonkamer_temperature: 24 | name: "Woonkamer temperatuur" 25 | expose: true 26 | room: "Woonkamer" 27 | script.radio_538: 28 | name: "Radio 538" 29 | expose: true 30 | room: "Woonkamer" 31 | script.qmusic: 32 | name: "Radio Q" 33 | expose: true 34 | room: "Woonkamer" 35 | script.nashville: 36 | name: "Nashville" 37 | expose: true 38 | room: "Woonkamer" 39 | switch.genie: 40 | name: "Genie" 41 | expose: true 42 | room: "Woonkamer" 43 | vacuum.rocky: 44 | name: "Stofzuiger" 45 | expose: true 46 | room: "Woonkamer" 47 | aliases: 48 | - "Rocky" 49 | script.whose_turn_is_it: 50 | name: "Tafeldekken" 51 | expose: true 52 | room: "Woonkamer" 53 | aliases: 54 | - "Tafel dekken" 55 | switch.kerstboom: 56 | name: "Kerstboom" 57 | expose: true 58 | room: "Woonkamer" 59 | 60 | ## Salon 61 | switch.grijze_lamp: 62 | name: "Grijze lamp" 63 | expose: true 64 | room: "Salon" 65 | light.staande_lamp_switch: 66 | name: "Staande lamp" 67 | expose: true 68 | room: "Salon" 69 | light.tv_kastje: 70 | name: "TV Kastje" 71 | expose: true 72 | room: "Salon" 73 | sensor.salon_temperatuur: 74 | name: "Salon temperatuur" 75 | expose: true 76 | room: "Salon" 77 | 78 | ## Dining room 79 | light.kast: 80 | name: "Kast" 81 | expose: true 82 | room: "Eetkamer" 83 | light.spots_eetkamer: 84 | name: "Spots eetkamer" 85 | expose: true 86 | room: "Eetkamer" 87 | 88 | ## Kitchen 89 | light.spots_keuken: 90 | name: "Spots keuken" 91 | expose: true 92 | room: "Keuken" 93 | 94 | ## Gang 95 | switch.gang: 96 | name: "Gang" 97 | expose: true 98 | room: "Gang" 99 | 100 | ## Badkamer 101 | light.badkamer: 102 | name: "Badkamer" 103 | expose: true 104 | room: "Badkamer" 105 | 106 | ## Slaapkamer MBR 107 | sensor.slaapkamer_temperature: 108 | name: "Temperatuur slaapkamer" 109 | expose: true 110 | room: "Slaapkamer" 111 | 112 | ## Slaapkamer T 113 | light.ledstrip_bed_mini: 114 | name: "Ledstrip bed mini" 115 | expose: true 116 | room: "Slaapkamer T" 117 | aliases: 118 | - "Led strip bed mini" 119 | light.ledstrip_mini: 120 | name: "Ledstrip mini" 121 | expose: true 122 | room: "Slaapkamer T" 123 | aliases: 124 | - "Led strip mini" 125 | sensor.slaapkamer_t_temperatuur: 126 | name: "Slaapkamer T temperatuur" 127 | expose: true 128 | room: "Slaapkamer T" 129 | 130 | ## Zolder 131 | light.sonoff_l1: 132 | name: "Ledstrip zolder" 133 | expose: true 134 | room: "Zolder" 135 | aliases: 136 | - "Led strip zolder" 137 | sensor.zolder_temperature: 138 | name: "Temperatuur zolder" 139 | expose: true 140 | room: "Zolder" 141 | 142 | ## Tuin 143 | group.lampen_tuin: 144 | name: "Tuinverlichting" 145 | expose: true 146 | room: "Tuin" 147 | -------------------------------------------------------------------------------- /packages/0 - Ground floor/Dining room/lights_dining_room.yaml: -------------------------------------------------------------------------------- 1 | lights_dining_room_package: 2 | group: 3 | lampen_eetkamer: 4 | name: Verlichting Eetkamer 5 | icon: mdi:silverware-variant 6 | entities: 7 | - light.eetkamer_tafel 8 | - light.kast 9 | - light.spots_eetkamer 10 | -------------------------------------------------------------------------------- /packages/0 - Ground floor/Dining room/vacuum.yaml: -------------------------------------------------------------------------------- 1 | vacuum_package: 2 | input_boolean: 3 | vacuum_enable_ask_for_cleaning: 4 | name: "Stofzuiger herinnering" 5 | icon: mdi:robot-vacuum 6 | 7 | input_datetime: 8 | vacuum_ask_for_cleaning_time: 9 | name: Stofzuiger herinnering tijdstip 10 | has_time: true 11 | has_date: false 12 | 13 | automation: 14 | ########################## 15 | ## Schedule 16 | ########################## 17 | - alias: "Vraag of Rocky moet stofzuigen" 18 | id: vacuum_ask_to_run 19 | variables: 20 | notification_service: > 21 | {% if is_state("device_tracker.sm_a336b", "home") and is_state("device_tracker.sm_a556b", "home") %}notify.mobile_devices_adults 22 | {% elif is_state("device_tracker.sm_a336b", "home") %}notify.mobile_app_sm_a336b 23 | {% elif is_state("device_tracker.sm_a556b", "home") %}notify.mobile_app_sm_a556b 24 | {% else %}notify.bogus 25 | {% endif %} 26 | triggers: 27 | - trigger: time 28 | at: input_datetime.vacuum_ask_for_cleaning_time 29 | conditions: 30 | - condition: state 31 | entity_id: input_boolean.vacuum_enable_ask_for_cleaning 32 | state: "on" 33 | - "{{ as_timestamp(now()) - as_timestamp(states('sensor.rocky_last_clean_start')) > 86400 }}" 34 | - condition: state 35 | entity_id: input_boolean.vacation_mode_away 36 | state: "off" 37 | actions: 38 | - alias: "Vraag of Rocky een rondje moet doen" 39 | action: "{{ notification_service }}" 40 | data: 41 | message: "Het is langer dan 24u geleden dat ik mijn laatste rondje heb gedaan. Zal ik gaan stofzuigen? 🧹🧹" 42 | title: "Rocky" 43 | data: 44 | tag: vacuum 45 | actions: 46 | - action: "vacuum_start_yes" 47 | title: "🧹 Ja, graag!" 48 | - action: "vacuum_start_no" 49 | title: "Nee, dank je." 50 | ttl: 0 51 | priority: high 52 | notification_icon: mdi:robot-vacuum 53 | - alias: "Wacht op antwoord..." 54 | wait_for_trigger: 55 | - trigger: event 56 | event_type: mobile_app_notification_action 57 | event_data: 58 | action: "vacuum_start_yes" 59 | timeout: "01:00:00" 60 | continue_on_timeout: false 61 | - alias: "Start Rocky na bevestiging" 62 | action: vacuum.start 63 | target: 64 | entity_id: vacuum.rocky 65 | 66 | - alias: "Stuur Rocky naar de vuilnisbak" 67 | id: vacuum_drive_to_trash 68 | initial_state: "on" 69 | triggers: 70 | - trigger: state 71 | entity_id: vacuum.rocky 72 | from: "cleaning" 73 | to: "returning" 74 | actions: 75 | - alias: "Stop Rocky before sending goto command" 76 | action: vacuum.stop 77 | entity_id: vacuum.rocky 78 | - delay: "00:00:02" 79 | - alias: "Send Rocky to the trash can" 80 | action: vacuum.send_command 81 | data: 82 | command: app_goto_target 83 | params: 84 | - 30301 85 | - 29421 86 | target: 87 | entity_id: vacuum.rocky 88 | - alias: "Wait for Rocky to arrive at trash can" 89 | wait_for_trigger: 90 | - trigger: state 91 | entity_id: vacuum.rocky 92 | to: "idle" 93 | timeout: "00:05:00" 94 | continue_on_timeout: false 95 | - action: notify.mobile_devices_adults 96 | data: 97 | message: "🧹 Hi! Ik moet geleegd worden en sta al bij de prullenbak. Druk na het legen op mijn 🏠 toets en ik ga terug naar mijn dock." 98 | title: "Rocky" 99 | data: 100 | tag: vacuum 101 | actions: 102 | - action: "vacuum_return_to_dock" 103 | title: "Keer terug naar je dock" 104 | ttl: 0 105 | priority: high 106 | notification_icon: mdi:robot-vacuum 107 | 108 | - alias: "Stuur Rocky terug naar het dock" 109 | id: vacuum_return_to_dock 110 | initial_state: "on" 111 | triggers: 112 | - trigger: event 113 | event_type: mobile_app_notification_action 114 | event_data: 115 | action: "vacuum_return_to_dock" 116 | actions: 117 | - action: vacuum.return_to_base 118 | alias: "Returning to dock" 119 | target: 120 | entity_id: vacuum.rocky 121 | 122 | ########################## 123 | ## Vacuum notifications 124 | ########################## 125 | - alias: "Melding dat Rocky aan het stofzuigen is" 126 | id: vacuum_notification_cleaning_started 127 | initial_state: "on" 128 | triggers: 129 | - trigger: state 130 | entity_id: vacuum.rocky 131 | from: "docked" 132 | to: "cleaning" 133 | actions: 134 | - action: notify.mobile_app_sm_a556b 135 | data: 136 | title: "Rocky" 137 | message: "Rocky doet zijn rondje! 🧹🧹" 138 | data: 139 | tag: vacuum 140 | notification_icon: mdi:robot-vacuum 141 | 142 | - alias: "Verwijder notificaties van Rocky" 143 | id: vacuum_clear_messages 144 | initial_state: "on" 145 | triggers: 146 | - trigger: state 147 | entity_id: sensor.rocky_vacuum_error 148 | to: "none" 149 | - trigger: state 150 | entity_id: vacuum.rocky 151 | from: "returning" 152 | to: "docked" 153 | actions: 154 | - action: notify.mobile_devices_adults 155 | data: 156 | message: clear_notification 157 | data: 158 | tag: "vacuum" 159 | ttl: 0 160 | priority: high 161 | 162 | ########################## 163 | ## Capture errors 164 | ########################## 165 | - alias: "Melding dat Rocky in foutmodus staat" 166 | id: vacuum_notification_error 167 | initial_state: "on" 168 | variables: 169 | notification_service: > 170 | {% if is_state("device_tracker.sm_a336b", "home") and is_state("device_tracker.sm_a556b", "home") %}notify.mobile_devices_adults 171 | {% elif is_state("device_tracker.sm_a336b", "home") %}notify.mobile_app_sm_a336b 172 | {% elif is_state("device_tracker.sm_a556b", "home") %}notify.mobile_app_sm_a556b 173 | {% else %}notify.bogus 174 | {% endif %} 175 | triggers: 176 | - trigger: state 177 | entity_id: sensor.rocky_vacuum_error 178 | conditions: 179 | - condition: not 180 | conditions: 181 | - condition: state 182 | entity_id: sensor.rocky_vacuum_error 183 | state: "none" 184 | - condition: state 185 | entity_id: sensor.rocky_vacuum_error 186 | state: "unavailable" 187 | actions: 188 | - action: "{{ notification_service }}" 189 | data: 190 | title: "Rocky heeft een probleem" 191 | message: "Foutmelding: {{states('sensor.rocky_vacuum_error')}}" 192 | data: 193 | tag: vacuum 194 | ttl: 0 195 | priority: high 196 | notification_icon: mdi:robot-vacuum 197 | -------------------------------------------------------------------------------- /packages/0 - Ground floor/Hallway/doorbell.yaml: -------------------------------------------------------------------------------- 1 | doorbell_package: 2 | input_boolean: 3 | enable_deurbel: 4 | name: "Deurbel" 5 | icon: mdi:doorbell 6 | 7 | automation: 8 | - id: "deurbel_met_ai_beschrijving" 9 | alias: Deurbel met AI beschrijving 10 | description: Stuur een notificatie met beschrijving als iemand aanbelt 11 | variables: 12 | group: "deurbel_camera" 13 | tag: "{{ group + int(as_timestamp(now()))|string }}" 14 | title: "De deurbel gaat" 15 | triggers: 16 | - trigger: state 17 | entity_id: binary_sensor.voordeur_bezoeker 18 | from: "off" 19 | to: "on" 20 | conditions: 21 | - condition: state 22 | entity_id: input_boolean.enable_deurbel 23 | state: "on" 24 | actions: 25 | - alias: Analyze event 26 | action: llmvision.image_analyzer 27 | response_variable: response 28 | data: 29 | image_entity: 30 | - camera.voordeur_vloeiend 31 | provider: 01JDVWVP7N8E70XMH6HMYWBCAN 32 | model: gemini-2.0-flash 33 | message: 34 | "Dit is een foto van mijn voordeur camera. Help me door te beschrijven of dit 35 | een bezorger of bezoeker is. Beschrijf de scène niet! 36 | Als de persoon een pakje of doos vast heeft is het vrijwel zeker 37 | een bezorger. Als je denkt dat het een bezorger is probeer dan in te schatten 38 | van welk bedrijf de bezorger is. Als de persoon kleding met oranje accenten aan 39 | heeft is het een PostNL bezorger. Heeft de persoon gele bovenkleding dan is 40 | het een DHL bezorger. Heeft de persoon rode kleding aan en in plaats van een pakje 41 | of doos plastic tassen in zijn/haar hand, dan is het een bezorger van Picnic. 42 | Misschien zie je een bestelauto in de foto: PostNL bezorgers rijden vaak in een witte bestelbus, terwijl 43 | DHL bezorgers vaak een gele bestelwagen rijden. Wij rijden zelf een kleine gele personenauto, 44 | verwar die niet met een bestelbus. Weet je niet zeker van welk bedrijf het is? 45 | Zeg dat dan. Antwoord met een korte zin in het Nederlands." 46 | remember: false 47 | include_filename: false 48 | max_tokens: 25 49 | temperature: 0.1 50 | expose_images: true 51 | - repeat: 52 | for_each: > 53 | {{ 54 | (expand(state_attr('zone.home', 'persons')) 55 | | map(attribute='attributes.source') 56 | | map('replace', 'device_tracker.', 'notify.mobile_app_') 57 | | list + ['notify.mobile_app_sm_a556b']) 58 | | unique | list 59 | }} 60 | sequence: 61 | - alias: Update notification to notify devices 62 | action: "{{ repeat.item }}" 63 | data: 64 | title: "{{ title }}" 65 | message: "{{ response.response_text }}" 66 | data: 67 | image: "{{response.key_frame.replace('/config/www/','/local/') }}" 68 | url: /lovelace/camera 69 | clickAction: /lovelace/camera 70 | tag: "{{ tag }}" 71 | group: "{{ group }}" 72 | notification_icon: mdi:doorbell-video 73 | priority: high 74 | timeout: 60 75 | ttl: 0 76 | visibility: public 77 | 78 | - id: "deurbel_stream_to_kiosk" 79 | alias: Stream de deurbel naar de kiosks 80 | triggers: 81 | - trigger: state 82 | entity_id: binary_sensor.voordeur_bezoeker 83 | from: "off" 84 | to: "on" 85 | conditions: 86 | - condition: state 87 | entity_id: input_boolean.enable_deurbel 88 | state: "on" 89 | actions: 90 | - action: browser_mod.popup 91 | data: 92 | dismissable: true 93 | autoclose: false 94 | browser_id: 95 | - kiosk1 96 | - kiosk2 97 | timeout: 60000 98 | size: fullscreen 99 | content: 100 | type: custom:advanced-camera-card 101 | cameras: 102 | - camera_entity: camera.voordeur_vloeiend 103 | - action: number.set_value 104 | data: 105 | value: "255" 106 | target: 107 | entity_id: 108 | - number.kiosk1_schermhelderheid 109 | - number.kiosk2_schermhelderheid 110 | -------------------------------------------------------------------------------- /packages/0 - Ground floor/Hallway/lights_hallway.yaml: -------------------------------------------------------------------------------- 1 | lights_hallway_package: 2 | group: 3 | pir_sensors_hallway: 4 | name: PIR Gang 5 | icon: mdi:motion-sensor 6 | entities: 7 | - binary_sensor.pir_gang_kapstok_motion_detection 8 | - binary_sensor.pir_gang_meterkast_motion_detection 9 | 10 | input_boolean: 11 | enable_pir_gang_automations: 12 | name: "Verlichting gang aan op beweging" 13 | icon: mdi:motion-sensor 14 | 15 | automation: 16 | - id: lights_gang 17 | alias: "Zet de gangverlichting aan of uit" 18 | mode: restart 19 | max_exceeded: silent 20 | triggers: 21 | - trigger: state 22 | entity_id: group.pir_sensors_hallway 23 | from: "off" 24 | to: "on" 25 | conditions: 26 | - condition: state 27 | entity_id: input_boolean.enable_pir_gang_automations 28 | state: "on" 29 | - condition: numeric_state 30 | entity_id: sun.sun 31 | attribute: elevation 32 | below: 5 33 | actions: 34 | - alias: "Gang lamp aan..." 35 | action: switch.turn_on 36 | target: 37 | entity_id: switch.gang 38 | - alias: "Wacht tot er geen motion meer is..." 39 | wait_for_trigger: 40 | - trigger: state 41 | entity_id: group.pir_sensors_hallway 42 | from: "on" 43 | to: "off" 44 | - alias: "Lamp uit.." 45 | action: switch.turn_off 46 | target: 47 | entity_id: switch.gang 48 | -------------------------------------------------------------------------------- /packages/0 - Ground floor/Hallway/wc_beneden.yaml: -------------------------------------------------------------------------------- 1 | wc_beneden_package: 2 | automation: 3 | - id: lights_wc_beneden 4 | alias: "Zet de verlichting van de WC beneden aan of uit" 5 | mode: restart 6 | max_exceeded: silent 7 | triggers: 8 | - trigger: state 9 | entity_id: binary_sensor.pir_wc_beneden_occupancy 10 | to: "on" 11 | from: "off" 12 | variables: 13 | action: turn_on 14 | - trigger: state 15 | entity_id: binary_sensor.pir_wc_beneden_occupancy 16 | to: "off" 17 | from: "on" 18 | for: "00:01:00" 19 | variables: 20 | action: turn_off 21 | conditions: [] 22 | actions: 23 | - alias: "Lamp WC beneden bedienen..." 24 | action: switch.{{ action }} 25 | target: 26 | entity_id: switch.wc_beneden 27 | 28 | - id: ventilation_wc_beneden 29 | alias: "Ventilatie aan als iemand lang op de WC beneden zit" 30 | triggers: 31 | - trigger: state 32 | entity_id: switch.wc_beneden 33 | to: "on" 34 | for: "00:03:00" 35 | conditions: 36 | - alias: "Als de ventilatie timer nog niet loopt" 37 | condition: state 38 | entity_id: timer.fan_runtime 39 | state: "idle" 40 | actions: 41 | - alias: "Afzuiging aanzetten" 42 | action: timer.start 43 | target: 44 | entity_id: timer.fan_runtime 45 | data: 46 | duration: "00:10:00" 47 | -------------------------------------------------------------------------------- /packages/0 - Ground floor/Kitchen/notification_dishwasher_cheapest_time.yaml: -------------------------------------------------------------------------------- 1 | dishwasher_cheapest_time_package: 2 | input_boolean: 3 | notify_dishwasher: 4 | name: "Push-meldingen over vaatwasser" 5 | icon: mdi:dishwasher-alert 6 | 7 | input_datetime: 8 | time_dishwasher_notification: 9 | name: Melding vaatwasser 10 | has_time: true 11 | 12 | template: 13 | - trigger: 14 | # This generates triggers for all changes in the entity, both in its state and its attributes. 15 | - trigger: state 16 | entity_id: sensor.zonneplan_current_electricity_tariff 17 | # This ensures the first data is filled. 18 | - trigger: event 19 | event_type: event_template_reloaded 20 | sensor: 21 | - name: "Vaatwasser goedkoopste tijd" 22 | unique_id: vaatwasser_goedkoopste_tijd 23 | state: >- 24 | {% set sensor = "sensor.zonneplan_current_electricity_tariff" %} 25 | {% set attr_all = "forecast" %} 26 | {% set value_key = "electricity_price" %} 27 | {% from "cheapest_energy_hours.jinja" import cheapest_energy_hours %} 28 | {% set best_time = cheapest_energy_hours(sensor, attr_all=attr_all, value_key=value_key, 29 | time_format="time24", no_weight_points=6, weight=[1, 1, 4, 4, 4, 4, 1, 1, 1, 4, 4, 1], 30 | include_tomorrow=true, start="18:00", end="06:30") %} 31 | {{ best_time }} 32 | availability: "{{ 'sensor.zonneplan_current_electricity_tariff' | has_value }}" 33 | 34 | automation: 35 | - alias: "Melding met de goedkoopste uren om de vaatwasser te gebruiken" 36 | id: vaatwasser_melding 37 | triggers: 38 | - trigger: time 39 | at: input_datetime.time_dishwasher_notification 40 | conditions: 41 | - alias: "Do we want notifications?" 42 | condition: state 43 | entity_id: input_boolean.notify_dishwasher 44 | state: "on" 45 | - alias: "Don't send when we're not at home" 46 | condition: state 47 | entity_id: input_boolean.vacation_mode_away 48 | state: "off" 49 | actions: 50 | - alias: "Sending push notification" 51 | action: notify.mobile_app_sm_a556b 52 | data: 53 | title: "Vaatwasser" 54 | message: "Het beste start je de vaatwasser om {{states('sensor.vaatwasser_goedkoopste_tijd')}}" 55 | data: 56 | tag: "notification-dishwasher" 57 | notification_icon: mdi:dishwasher 58 | ttl: 0 59 | priority: high 60 | -------------------------------------------------------------------------------- /packages/0 - Ground floor/Livingroom/lights_livingroom.yaml: -------------------------------------------------------------------------------- 1 | lights_livingroom_package: 2 | group: 3 | lampen_woonkamer: 4 | name: Verlichting Woonkamer 5 | icon: mdi:sofa-outline 6 | entities: 7 | - light.spots_vaas 8 | - light.spots_woonkamer 9 | 10 | input_boolean: 11 | enable_woonkamer_sunset_automations: 12 | name: "Vaas aan bij sunset" 13 | icon: mdi:motion-sensor 14 | 15 | automation: 16 | ########################## 17 | ## Sunset lights woonkamer 18 | ########################## 19 | - id: set_lights_before_sunset 20 | alias: "Zet de verlichting aan bij zonsondergang" 21 | triggers: 22 | trigger: sun 23 | event: sunset 24 | offset: "-00:45:00" 25 | conditions: 26 | and: 27 | - condition: state 28 | entity_id: input_boolean.enable_woonkamer_sunset_automations 29 | state: "on" 30 | - condition: state 31 | entity_id: group.all_adults 32 | state: home 33 | - condition: state 34 | entity_id: group.lampen_woonkamer 35 | state: "off" 36 | actions: 37 | - action: light.turn_on 38 | data: 39 | brightness_pct: 20 40 | target: 41 | entity_id: light.spots_vaas 42 | -------------------------------------------------------------------------------- /packages/0 - Ground floor/Livingroom/symfonisk.yaml: -------------------------------------------------------------------------------- 1 | symfonisk_package: 2 | automation: 3 | - id: "symfonisk_remote_control" 4 | alias: "Symfonisk afstandsbediening" 5 | description: > 6 | Control my Symfonisk speaker with an IKEA E2123 remote control, 7 | based on the blueprint by Shawsky found at https://community.home-assistant.io/t/z2m-ikea-symfonisk-gen2-e2123-media-control/559523 8 | mode: restart 9 | max_exceeded: silent 10 | variables: 11 | player: media_player.sonos_woonkamer 12 | steps: 20 # 25 is Sonos default 13 | stepsize: "{{ 1.0 / steps }}" 14 | triggers: 15 | - trigger: state 16 | entity_id: event.afstandsbediening_sonos_action 17 | not_from: 18 | - unavailable 19 | - unknown 20 | variables: 21 | event: "{{ trigger.to_state.attributes.event_type | default('unknown', true) }}" 22 | actions: 23 | - choose: 24 | - conditions: "{{ event == 'toggle' }}" 25 | sequence: 26 | - action: media_player.media_play_pause 27 | target: 28 | entity_id: "{{ player }}" 29 | - conditions: "{{ event == 'track_next' }}" 30 | sequence: 31 | - action: media_player.media_next_track 32 | target: 33 | entity_id: "{{ player }}" 34 | - conditions: "{{ event == 'track_previous' }}" 35 | sequence: 36 | - action: media_player.media_previous_track 37 | target: 38 | entity_id: "{{ player }}" 39 | - conditions: "{{ event == 'volume_up' }}" 40 | sequence: 41 | - action: media_player.volume_set 42 | target: 43 | entity_id: "{{ player }}" 44 | data: 45 | volume_level: >- 46 | {% set volume = state_attr(player, "volume_level") + stepsize %} 47 | {{ 1.0 if volume > 1.0 else volume }} 48 | - conditions: "{{ event == 'volume_down' }}" 49 | sequence: 50 | - action: media_player.volume_set 51 | target: 52 | entity_id: "{{ player }}" 53 | data: 54 | volume_level: >- 55 | {% set volume = state_attr(player,"volume_level") - stepsize %} 56 | {{ 0.0 if volume < 0.0 else volume }} 57 | - conditions: "{{ event == 'volume_up_hold' }}" 58 | sequence: 59 | - action: media_player.volume_set 60 | target: 61 | entity_id: "{{ player }}" 62 | data: 63 | volume_level: >- 64 | {% set volume = state_attr(player, "volume_level") + stepsize %} 65 | {{ 1.0 if volume > 1.0 else volume }} 66 | - conditions: "{{ event == 'volume_down_hold' }}" 67 | sequence: 68 | - action: media_player.volume_set 69 | target: 70 | entity_id: "{{ player }}" 71 | data: 72 | volume_level: >- 73 | {% set volume = state_attr(player, "volume_level") - stepsize %} 74 | {{ 0.0 if volume < 0.0 else volume }} 75 | - conditions: "{{ event == 'dots_1_short_release' }}" 76 | sequence: 77 | - action: script.radio_538 78 | - conditions: "{{ event == 'dots_1_double_press' }}" 79 | sequence: 80 | - action: media_player.play_media 81 | target: 82 | entity_id: "{{ player }}" 83 | data: 84 | media_content_id: FV:2/12 85 | media_content_type: favorite_item_id 86 | - conditions: "{{ event == 'dots_1_long_press' }}" 87 | sequence: [] 88 | - conditions: "{{ event == 'dots_2_short_release' }}" 89 | sequence: 90 | - action: script.qmusic 91 | - conditions: "{{ event == 'dots_2_double_press' }}" 92 | sequence: 93 | - action: media_player.play_media 94 | target: 95 | entity_id: "{{ player }}" 96 | data: 97 | media_content_id: FV:2/7 98 | media_content_type: favorite_item_id 99 | - conditions: "{{ event == 'dots_2_long_press' }}" 100 | sequence: 101 | - action: script.nashville 102 | 103 | script: 104 | radio_538: 105 | alias: Radio 538 106 | description: "Play Radio 538 on our Symfonisk speaker" 107 | icon: mdi:cast-audio-variant 108 | mode: single 109 | max_exceeded: silent 110 | sequence: 111 | - action: media_player.play_media 112 | target: 113 | entity_id: media_player.sonos_woonkamer 114 | data: 115 | media_content_id: FV:2/6 116 | media_content_type: favorite_item_id 117 | 118 | qmusic: 119 | alias: Q Music 120 | description: "Play Q Music on our Symfonisk" 121 | icon: mdi:cast-audio-variant 122 | mode: single 123 | max_exceeded: silent 124 | sequence: 125 | - action: media_player.play_media 126 | target: 127 | entity_id: media_player.sonos_woonkamer 128 | data: 129 | media_content_id: FV:2/8 130 | media_content_type: favorite_item_id 131 | 132 | nashville: 133 | alias: Nashville 134 | description: "Play Nashville FM on our Symfonisk (Grandma's favorite!)" 135 | icon: mdi:cast-audio-variant 136 | mode: single 137 | max_exceeded: silent 138 | sequence: 139 | - action: media_player.play_media 140 | target: 141 | entity_id: media_player.sonos_woonkamer 142 | data: 143 | media_content_id: FV:2/9 144 | media_content_type: favorite_item_id 145 | -------------------------------------------------------------------------------- /packages/0 - Ground floor/Salon/lights_salon.yaml: -------------------------------------------------------------------------------- 1 | lights_salon_package: 2 | group: 3 | lampen_salon: 4 | name: Alle lampen salon 5 | icon: mdi:sofa-single 6 | entities: 7 | - light.salon 8 | - light.staande_lamp_switch 9 | - light.tv_kastje 10 | - light.grijze_lamp 11 | sfeerverlichting_salon: 12 | name: Sfeerverlichting salon 13 | icon: mdi:sofa-single 14 | entities: 15 | - light.staande_lamp_switch 16 | - light.grijze_lamp 17 | 18 | automation: 19 | - id: "salon_remote_control" 20 | alias: "Schakelaar salon" 21 | description: > 22 | Control some lights with an Aqara H1 double wireless remote switch (WRS-R02 / WXKG15LM) 23 | mode: restart 24 | max_exceeded: silent 25 | triggers: 26 | - trigger: state 27 | entity_id: event.schakelaar_salon_action 28 | not_from: 29 | - unavailable 30 | - unknown 31 | variables: 32 | event: "{{ trigger.to_state.attributes.event_type | default('unknown', true) }}" 33 | actions: 34 | - choose: 35 | - conditions: "{{ event == 'single_left' }}" 36 | sequence: 37 | - action: script.light_group_toggle_helper 38 | data: 39 | group: group.sfeerverlichting_salon 40 | - conditions: "{{ event == 'single_right' }}" 41 | sequence: 42 | - action: light.toggle 43 | target: 44 | entity_id: 45 | - light.tv_kastje 46 | - conditions: "{{ event == 'single_both' }}" 47 | sequence: [] 48 | - conditions: "{{ event == 'double_left' }}" 49 | sequence: 50 | - action: light.turn_on 51 | target: 52 | entity_id: light.salon 53 | data: 54 | brightness_pct: 100 55 | - conditions: "{{ event == 'double_right' }}" 56 | sequence: 57 | - action: light.turn_on 58 | target: 59 | entity_id: light.salon 60 | data: 61 | brightness_pct: 25 62 | - conditions: "{{ event == 'double_both' }}" 63 | sequence: [] 64 | - conditions: "{{ event == 'triple_left' }}" 65 | sequence: [] 66 | - conditions: "{{ event == 'triple_right' }}" 67 | sequence: [] 68 | - conditions: "{{ event == 'triple_both' }}" 69 | sequence: [] 70 | - conditions: "{{ event == 'hold_left' }}" 71 | sequence: [] 72 | - conditions: "{{ event == 'hold_right' }}" 73 | sequence: [] 74 | - conditions: "{{ event == 'hold_both' }}" 75 | sequence: [] 76 | -------------------------------------------------------------------------------- /packages/0 - Ground floor/Utility room/utility_room.yaml: -------------------------------------------------------------------------------- 1 | utility_room_package: 2 | input_boolean: 3 | enable_pir_bijkeuken_automations: 4 | name: "Verlichting bijkeuken aan op beweging" 5 | icon: mdi:motion-sensor 6 | 7 | automation: 8 | - id: lights_bijkeuken 9 | alias: "Zet de verlichting in de bijkeuken aan of uit" 10 | mode: restart 11 | max_exceeded: silent 12 | triggers: 13 | - trigger: state 14 | entity_id: binary_sensor.pir_bijkeuken_occupancy 15 | to: "on" 16 | from: "off" 17 | variables: 18 | action: turn_on 19 | - trigger: state 20 | entity_id: binary_sensor.pir_bijkeuken_occupancy 21 | to: "off" 22 | from: "on" 23 | variables: 24 | action: turn_off 25 | conditions: 26 | - condition: state 27 | entity_id: input_boolean.enable_pir_bijkeuken_automations 28 | state: "on" 29 | actions: 30 | - alias: "Bijkeuken lamp bedienen..." 31 | action: switch.{{ action }} 32 | target: 33 | entity_id: switch.bijkeuken 34 | -------------------------------------------------------------------------------- /packages/1 - First floor/Bedroom mini/minicave.yaml: -------------------------------------------------------------------------------- 1 | bedroom_minicave_package: 2 | group: 3 | lampen_minicave: 4 | name: Verlichting Minicave 5 | icon: mdi:lightbulb-multiple-outline 6 | entities: 7 | - light.ledstrip_mini 8 | - light.ledstrip_bed_mini 9 | 10 | input_boolean: 11 | notify_power_use_minicave: 12 | name: Waarschuwing minicave 13 | icon: mdi:lightbulb-on-outline 14 | 15 | input_datetime: 16 | time_poweruse_minicave: 17 | name: Tijd poweruse minicave 18 | has_time: true 19 | 20 | input_number: 21 | mini_pc_time_weekday: 22 | name: PC tijd mini weekdag 23 | min: 0 24 | max: 12 25 | step: 0.5 26 | icon: mdi:desktop-classic 27 | mini_pc_time_weekend: 28 | name: PC tijd mini weekend 29 | min: 0 30 | max: 12 31 | step: 0.5 32 | icon: mdi:desktop-classic 33 | 34 | sensor: 35 | - platform: history_stats 36 | unique_id: minicave_pc_on_today 37 | name: Minicave PC on today 38 | entity_id: binary_sensor.minicave_pc 39 | state: "on" 40 | type: time 41 | start: "{{ now().replace(hour=0, minute=0, second=0) }}" 42 | end: "{{ now() }}" 43 | - platform: history_stats 44 | unique_id: minicave_tv_on_today 45 | name: Minicave TV on today 46 | entity_id: binary_sensor.is_minicave_TV_on 47 | state: "on" 48 | type: time 49 | start: "{{ now().replace(hour=0, minute=0, second=0) }}" 50 | end: "{{ now() }}" 51 | 52 | template: 53 | - binary_sensor: 54 | - name: "Is minicave TV on" 55 | unique_id: is_minicave_TV_on 56 | state: "{{ 50 > states('sensor.mini_cave_power') | int(default=0) > 30 }}" 57 | - name: "Is minicave PC on" 58 | unique_id: is_minicave_pc_on 59 | state: "{{ states('binary_sensor.minicave_pc') }}" 60 | 61 | automation: 62 | ## Warnings on power usage on kid's bedroom 63 | ## The little one shouldn't be at his PC after bedtime. 64 | - id: warn_power_usage_after_bedtime_minicave 65 | alias: "Waarschuwing dat de minicave nog stroom verbruikt" 66 | mode: queued 67 | triggers: 68 | - trigger: numeric_state 69 | entity_id: sensor.mini_cave_power 70 | above: 80 71 | id: PC 72 | - trigger: numeric_state 73 | entity_id: sensor.mini_cave_power 74 | above: 30 75 | below: 80 76 | id: TV 77 | conditions: 78 | - condition: state 79 | entity_id: input_boolean.notify_power_use_minicave 80 | state: "on" 81 | - condition: time 82 | after: input_datetime.time_poweruse_minicave 83 | actions: 84 | - action: notify.mobile_devices_adults 85 | data: 86 | title: "Minicave {{ trigger.id }}" 87 | message: >- 88 | {% if trigger.id == "PC" %} 89 | De computer van de mini staat nog aan... ({{ now().strftime('%H:%M') }}). 90 | {% else %} 91 | De TV van de mini staat nog aan... ({{ now().strftime('%H:%M') }}). 92 | {% endif %} 93 | data: 94 | tag: minicave 95 | notification_icon: mdi:home-lightning-bolt 96 | ttl: 0 97 | priority: high 98 | 99 | - id: power_logging_minicave 100 | alias: "Log stroomverbruik in de minicave" 101 | description: >- 102 | Because the switch is always on and only used for power tracking, 103 | we need another way to track this switch in the logbook. We use 104 | 22 and 8 watts as crossover point. 105 | mode: queued 106 | triggers: 107 | - trigger: numeric_state 108 | entity_id: sensor.mini_cave_power 109 | above: 22 110 | id: minicave 111 | - trigger: numeric_state 112 | entity_id: sensor.mini_cave_power 113 | below: 8 114 | id: minicave 115 | actions: 116 | - action: logbook.log 117 | data: 118 | name: Minicave 119 | entity_id: sensor.mini_cave_power 120 | message: >- 121 | {{ iif(states('sensor.mini_cave_power') | float > 22, "is aan", "is uit")}} 122 | 123 | - id: warn_pc_time_over_minicave 124 | alias: "Waarschuwing dat de mini te lang op de PC zit" 125 | mode: queued 126 | triggers: 127 | - trigger: numeric_state 128 | entity_id: sensor.minicave_pc_on_today 129 | above: input_number.mini_pc_time_weekday 130 | id: weekday 131 | - trigger: numeric_state 132 | entity_id: sensor.minicave_pc_on_today 133 | above: input_number.mini_pc_time_weekend 134 | id: weekend 135 | conditions: 136 | - or: 137 | - and: 138 | - '{{ trigger.id == "weekday" }}' 139 | - condition: time 140 | weekday: 141 | - mon 142 | - tue 143 | - wed 144 | - thu 145 | - fri 146 | - and: 147 | - '{{ trigger.id == "weekend" }}' 148 | - condition: time 149 | weekday: 150 | - sat 151 | - sun 152 | actions: 153 | - action: scene.create 154 | data: 155 | scene_id: snapshot_minicave 156 | snapshot_entities: 157 | - light.ledstrip_mini 158 | - delay: 159 | seconds: 5 160 | - action: light.turn_on 161 | target: 162 | entity_id: light.ledstrip_mini 163 | data: 164 | color_name: red 165 | - delay: 166 | seconds: 2 167 | - repeat: 168 | count: 5 169 | sequence: 170 | - action: light.toggle 171 | data: {} 172 | target: 173 | entity_id: light.ledstrip_mini 174 | - delay: 175 | seconds: 1 176 | milliseconds: 200 177 | - action: light.toggle 178 | data: {} 179 | target: 180 | entity_id: light.ledstrip_mini 181 | - delay: 182 | seconds: 1 183 | milliseconds: 200 184 | - action: tts.microsoft_say 185 | data: 186 | entity_id: media_player.slaapkamer_t 187 | message: "Je tijd is op. Sluit je af?" 188 | - action: notify.mobile_app_sm_a236b 189 | data: 190 | title: Tijd is om 191 | message: Je tijd is op. Sluit je af? 192 | data: 193 | tag: mini_pc 194 | notification_icon: mdi:desktop-classic 195 | priority: high 196 | ttl: 0 197 | - action: notify.mobile_devices_adults 198 | data: 199 | title: Mini's gametijd 200 | message: >- 201 | De Mini heeft nu lang genoeg achter de PC gezeten ({{ now().strftime('%H:%M') }}). 202 | data: 203 | tag: mini_pc 204 | notification_icon: mdi:desktop-classic 205 | priority: high 206 | ttl: 0 207 | - delay: 208 | seconds: 5 209 | - action: scene.turn_on 210 | data: 211 | entity_id: scene.snapshot_minicave 212 | -------------------------------------------------------------------------------- /packages/1 - First floor/Bedroom mini/sleep_and_wakeup_light_mini.yaml: -------------------------------------------------------------------------------- 1 | wakeup_light_mini_package: 2 | automation: 3 | - id: wakeup_light_mini 4 | alias: "Wakeup light mini" 5 | mode: single 6 | triggers: 7 | - trigger: time 8 | at: sensor.home_mini_slaapkamer_t_alarms 9 | conditions: [] 10 | actions: 11 | - delay: 00:00:01 12 | - action: light.turn_on 13 | data: 14 | brightness_pct: 5 15 | target: 16 | entity_id: 17 | - light.ledstrip_bed_mini 18 | - delay: 00:00:02 19 | - repeat: 20 | sequence: 21 | - service: light.turn_on 22 | data: 23 | entity_id: light.ledstrip_bed_mini 24 | brightness: "{{ state_attr('light.ledstrip_bed_mini', 'brightness') | int + 15 }}" 25 | - delay: 2 26 | until: 27 | condition: or 28 | conditions: 29 | - condition: template 30 | value_template: "{{ state_attr('light.ledstrip_bed_mini', 'brightness') | int >= 191 }}" 31 | - condition: state 32 | entity_id: light.ledstrip_bed_mini 33 | state: "off" 34 | - delay: 00:10:00 35 | - action: light.turn_off 36 | target: 37 | entity_id: light.ledstrip_bed_mini 38 | 39 | - id: turn_off_lights_t_when_starting_google_home_sleeping_sounds 40 | alias: "Lampen slaapkamer T uit als 'zomerse nachtgeluiden' beginnen" 41 | mode: queued 42 | triggers: 43 | - trigger: state 44 | entity_id: media_player.slaapkamer_t 45 | attribute: app_id 46 | to: "9731D581" 47 | for: "00:00:02" 48 | conditions: 49 | actions: 50 | - action: media_player.volume_set 51 | data: 52 | entity_id: media_player.slaapkamer_t 53 | volume_level: 0.4 54 | - if: 55 | - condition: state 56 | entity_id: light.ledstrip_bed_mini 57 | state: "on" 58 | then: 59 | - action: light.turn_off 60 | target: 61 | entity_id: light.ledstrip_bed_mini 62 | data: 63 | transition: 5 64 | - delay: 00:40:00 65 | - action: media_player.volume_set 66 | data: 67 | entity_id: media_player.slaapkamer_t 68 | volume_level: 0.3 69 | - delay: 00:05:00 70 | - action: media_player.volume_set 71 | data: 72 | entity_id: media_player.slaapkamer_t 73 | volume_level: 0.1 74 | - action: media_player.turn_off 75 | data: 76 | entity_id: media_player.slaapkamer_t 77 | -------------------------------------------------------------------------------- /packages/1 - First floor/Master bedroom/master_bedroom.yaml: -------------------------------------------------------------------------------- 1 | master_bedroom_package: 2 | input_boolean: 3 | enable_pir_inloopkast_automations: 4 | name: "Verlichting inloopkast aan op beweging" 5 | icon: mdi:motion-sensor 6 | 7 | automation: 8 | - id: lights_mbr_inloopkast 9 | alias: "Zet de verlichting van de inloopkast op de MBR aan of uit" 10 | mode: restart 11 | max_exceeded: silent 12 | triggers: 13 | - trigger: state 14 | entity_id: binary_sensor.pir_inloopkast_occupancy 15 | to: "on" 16 | from: "off" 17 | variables: 18 | action: turn_on 19 | - trigger: state 20 | entity_id: binary_sensor.pir_inloopkast_occupancy 21 | to: "off" 22 | from: "on" 23 | variables: 24 | action: turn_off 25 | conditions: 26 | - condition: state 27 | entity_id: input_boolean.enable_pir_inloopkast_automations 28 | state: "on" 29 | actions: 30 | - alias: "Inloopkast lamp bedienen..." 31 | action: switch.{{ action }} 32 | target: 33 | entity_id: switch.inloopkast 34 | -------------------------------------------------------------------------------- /packages/1 - First floor/Office/printer.yaml: -------------------------------------------------------------------------------- 1 | printer_package: 2 | automation: 3 | - id: printer_low_toner_levels 4 | alias: "Stuur waarschuwing dat de printer toner levels laag zijn" 5 | triggers: 6 | - trigger: numeric_state 7 | entity_id: 8 | - sensor.hp_printer_black_toner_niveau 9 | - sensor.hp_printer_cyan_toner_niveau 10 | - sensor.hp_printer_magenta_toner_niveau 11 | - sensor.hp_printer_yellow_toner_niveau 12 | below: 26 13 | - trigger: numeric_state 14 | entity_id: 15 | - sensor.hp_printer_black_toner_niveau 16 | - sensor.hp_printer_cyan_toner_niveau 17 | - sensor.hp_printer_magenta_toner_niveau 18 | - sensor.hp_printer_yellow_toner_niveau 19 | below: 11 20 | variables: 21 | color_descr: 22 | sensor.hp_printer_black_toner_niveau: "zwarte" 23 | sensor.hp_printer_cyan_toner_niveau: "blauwe" 24 | sensor.hp_printer_magenta_toner_niveau: "rode" 25 | sensor.hp_printer_yellow_toner_niveau: "gele" 26 | color: > 27 | {{ color_descr.get(trigger.entity_id, "unknown") }} 28 | conditions: 29 | - alias: "Previous state is not unavailable or unkown" 30 | condition: template 31 | value_template: "{{ trigger.from_state.state not in ['unavailable', 'unknown'] }}" 32 | actions: 33 | - variables: 34 | message: > 35 | De {{ color }} toner is nog maar voor {{ states(trigger.entity_id) }}% vol 36 | - alias: "Send notification" 37 | action: notify.mobile_app_sm_a556b 38 | data: 39 | title: "Printer is low on toner" 40 | message: "{{ message }}" 41 | data: 42 | channel: Printer 43 | notification_icon: mdi:printer 44 | -------------------------------------------------------------------------------- /packages/1 - First floor/wc_boven.yaml: -------------------------------------------------------------------------------- 1 | wc_boven_package: 2 | automation: 3 | - id: lights_wc_boven 4 | alias: "Zet de verlichting van de WC boven aan of uit" 5 | mode: restart 6 | max_exceeded: silent 7 | triggers: 8 | - trigger: state 9 | entity_id: binary_sensor.pir_wc_boven_occupancy 10 | to: "on" 11 | from: "off" 12 | id: turn_on 13 | - trigger: state 14 | entity_id: binary_sensor.pir_wc_boven_occupancy 15 | to: "off" 16 | from: "on" 17 | id: turn_off 18 | conditions: [] 19 | actions: 20 | - alias: "Checking what to do" 21 | choose: 22 | - alias: "Do we need to turn on the lights?" 23 | conditions: 24 | - "{{ trigger.id == 'turn_on' }}" 25 | sequence: 26 | - if: 27 | - alias: "Is het tijdens de donkere uren?" 28 | condition: time 29 | after: "22:30:00" 30 | before: "06:45:00" 31 | then: 32 | - alias: "Lamp WC boven gedimd aan..." 33 | action: light.turn_on 34 | target: 35 | entity_id: light.wc_boven 36 | data: 37 | brightness: 80 38 | else: 39 | - alias: "Lamp WC boven voluit aan..." 40 | action: light.turn_on 41 | target: 42 | entity_id: light.wc_boven 43 | data: 44 | brightness: 255 45 | - alias: "Do we need to turn off the lights?" 46 | conditions: 47 | - "{{ trigger.id == 'turn_off' }}" 48 | sequence: 49 | - alias: "Lamp WC boven uitzetten..." 50 | action: light.turn_off 51 | target: 52 | entity_id: light.wc_boven 53 | 54 | - id: ventilation_wc_boven 55 | alias: "Ventilatie aan als iemand lang op de WC zit" 56 | triggers: 57 | - trigger: state 58 | entity_id: light.wc_boven 59 | to: "on" 60 | for: "00:03:00" 61 | conditions: 62 | - alias: "Als de ventilatie timer nog niet loopt" 63 | condition: state 64 | entity_id: timer.fan_runtime 65 | state: "idle" 66 | actions: 67 | - alias: "Afzuiging aanzetten" 68 | action: timer.start 69 | target: 70 | entity_id: timer.fan_runtime 71 | data: 72 | duration: "00:10:00" 73 | -------------------------------------------------------------------------------- /packages/2 - Second floor/Bedroom maxi/wakeup_light.yaml: -------------------------------------------------------------------------------- 1 | wakeup_light_maxi_package: 2 | automation: 3 | - id: wakeup_light_maxi 4 | alias: "Wakeup light maxi" 5 | mode: single 6 | triggers: 7 | - trigger: time 8 | at: sensor.zolder_alarms 9 | conditions: [] 10 | actions: 11 | - action: light.turn_on 12 | data: 13 | brightness_pct: 100 14 | color_temp_kelvin: 3500 15 | target: 16 | entity_id: light.sonoff_l1 17 | - action: light.turn_on 18 | target: 19 | entity_id: light.battletron_ball_light_m 20 | - delay: 00:05:00 21 | - service: light.turn_off 22 | entity_id: 23 | - light.battletron_ball_light_m 24 | - light.sonoff_l1 25 | -------------------------------------------------------------------------------- /packages/3 - Mr/gas_prices.yaml: -------------------------------------------------------------------------------- 1 | gas_prices_package: 2 | multiscrape: 3 | ########################## 4 | ## Gas prices sensor 5 | ## 6 | ## Just scraping the Tinq website page for the needed information 7 | ## URL is to their site: https://www.tinq.nl/tankstations/utrecht-atoomweg (random example) 8 | ## Using !secret as to somewhat keep some privacy for the exact location I scrape. 9 | ########################## 10 | - name: gasprices 11 | resource: !secret scrape_url_tinq 12 | scan_interval: 3594 # little bit less than 1hr 13 | timeout: 5 14 | sensor: 15 | - unique_id: benzine 16 | name: "Benzine" 17 | icon: mdi:gas-station 18 | select: ".taxonomy-term-Euro95 .field--name-field-prices-price-pump" 19 | attribute: "content" 20 | device_class: monetary 21 | unit_of_measurement: EUR 22 | 23 | automation: 24 | ########################## 25 | ## Gasprice notifications 26 | ########################## 27 | - id: notification_benzine_price_changed 28 | alias: "Verstuur melding dat de benzineprijzen gewijzigd zijn" 29 | triggers: 30 | - trigger: state 31 | entity_id: sensor.benzine 32 | not_from: 33 | - "unknown" 34 | - "unavailable" 35 | - "none" 36 | not_to: 37 | - "unknown" 38 | - "unavailable" 39 | - "none" 40 | conditions: 41 | - alias: "Check if price really changed" 42 | condition: template 43 | value_template: "{{ trigger.to_state.state != trigger.from_state.state }}" 44 | actions: 45 | - action: notify.mobile_app_sm_a556b 46 | data: 47 | title: >- 48 | {{ iif(trigger.to_state.state < trigger.from_state.state, "Benzine wordt goedkoper", "Benzine wordt duurder") }} 49 | message: >- 50 | ⛽ De benzineprijs is {{ iif(trigger.to_state.state < trigger.from_state.state, "gezakt.", "gestegen.") }} 51 | Nieuwe prijs: {{ trigger.to_state.state }}. 52 | Oude prijs: {{ trigger.from_state.state }}. 53 | data: 54 | tag: benzine 55 | channel: benzine 56 | notification_icon: mdi:gas-station 57 | -------------------------------------------------------------------------------- /packages/3 - Mr/morning_briefing.yaml: -------------------------------------------------------------------------------- 1 | morning_briefing_package: 2 | ########################## 3 | ## Sends a morning briefing message to my phone 4 | ########################## 5 | input_datetime: 6 | time_morning_briefing: 7 | name: Start morning briefing 8 | has_time: true 9 | 10 | automation: 11 | - id: morning_briefing 12 | alias: "Verstuur ochtendbriefing" 13 | description: "Notifications: Morning briefing" 14 | triggers: 15 | trigger: time 16 | at: input_datetime.time_morning_briefing 17 | actions: 18 | - action: notify.mobile_devices_papa_and_mini 19 | data: 20 | title: Good morning sunshine! 21 | message: >- 22 | Vandaag komt de zon op om {{ as_timestamp(state_attr('sun.sun', 'next_rising')) | timestamp_custom("%H:%M") }} en 23 | wordt het {{ states('sensor.knmi_max_temperatuur_vandaag', with_unit=True)}}. 24 | Momenteel is het {{ states('sensor.knmi_temperatuur', with_unit=True) }} en {{ states('sensor.knmi_omschrijving') | lower}}. 25 | {{ states('sensor.knmi_weersverwachting') }}. 26 | data: 27 | tag: "morning-brief" 28 | notification_icon: mdi:weather-sunset-up 29 | -------------------------------------------------------------------------------- /packages/3 - Mr/travel_time_notifications.yaml: -------------------------------------------------------------------------------- 1 | travel_time_notifications_package: 2 | input_boolean: 3 | location_bob_travelling_home: 4 | name: "Bob onderweg naar huis" 5 | 6 | automation: 7 | ########################## 8 | ## Update Waze sensors 9 | ########################## 10 | # I have disabled the polling of this integration to reduce the 11 | # amount of requests that are sent to the Waze server. This 1st 12 | # automation below takes care of updating the sensor, and is 13 | # turned on/off by automations below - normally it's off. 14 | - id: update_waze_to_home 15 | alias: "Werk Waze reistijd bij" 16 | description: "Update: Waze travel time to home" 17 | triggers: 18 | - trigger: time_pattern 19 | minutes: "/5" 20 | seconds: 00 21 | actions: 22 | - action: homeassistant.update_entity 23 | entity_id: sensor.reistijd_bob_naar_huis 24 | 25 | ########################## 26 | ## Coming home notifications 27 | ########################## 28 | # I always connect my phone to my car through Android Auto, 29 | # so it's a good way to detect if I start driving. If I do 30 | # this outside three of my most used locations, HA will 31 | # ask me if I'd like to send a "coming home" message. 32 | # It's done by a actionable notification in the HA app. 33 | - id: location_ask_to_send_notification_hmmbob_left 34 | alias: "Vraag of we een melding moeten versturen dat Bob vertrekt" 35 | triggers: 36 | - trigger: state 37 | entity_id: binary_sensor.sm_a556b_android_auto 38 | from: "off" 39 | to: "on" 40 | conditions: 41 | - not: 42 | - or: 43 | - condition: zone 44 | entity_id: device_tracker.sm_a556b 45 | zone: zone.home 46 | - condition: zone 47 | entity_id: device_tracker.sm_a556b 48 | zone: zone.breda 49 | - condition: zone 50 | entity_id: device_tracker.sm_a556b 51 | zone: zone.vkl 52 | - alias: "Don't run if we already sent a message" 53 | condition: state 54 | entity_id: input_boolean.location_bob_travelling_home 55 | state: "on" 56 | actions: 57 | - alias: "Sending push notification" 58 | action: notify.mobile_app_sm_a556b 59 | data: 60 | title: "Reistijd" 61 | message: "Wil je een melding versturen?" 62 | data: 63 | car_ui: true 64 | notification_icon: mdi:car-side 65 | actions: 66 | - action: "send_traveltime" 67 | title: "Ja" 68 | tag: "ask-waze" 69 | ttl: 0 70 | priority: high 71 | 72 | # Either when I leave some pre-defined zones, or when I click 73 | # the actionable notification that was sent to my HA app, HA will 74 | # send a "coming home" persistent notification to my wife. 75 | - id: location_notification_hmmbob_left_work 76 | alias: "Verstuur melding dat Bob van het werk vertrekt" 77 | triggers: 78 | - trigger: event 79 | event_type: mobile_app_notification_action 80 | event_data: 81 | action: "send_traveltime" 82 | - trigger: zone 83 | entity_id: device_tracker.sm_a556b 84 | event: leave 85 | zone: zone.breda 86 | - trigger: zone 87 | entity_id: device_tracker.sm_a556b 88 | event: leave 89 | zone: zone.vkl 90 | conditions: 91 | - condition: time 92 | after: "14:00:00" 93 | before: "19:00:00" 94 | weekday: 95 | - mon 96 | - tue 97 | - wed 98 | - thu 99 | - fri 100 | actions: 101 | - alias: "Register that Bob is travelling home" 102 | action: input_boolean.turn_on 103 | target: 104 | entity_id: input_boolean.location_bob_travelling_home 105 | - alias: "Update Waze sensor (it doesn't update automatically)" 106 | action: homeassistant.update_entity 107 | entity_id: sensor.reistijd_bob_naar_huis 108 | - alias: "Wait for the update to finish" 109 | delay: 110 | seconds: 10 111 | - alias: "Ok, let's tell the people!" 112 | action: notify.mobile_devices_adults 113 | data: 114 | title: ♥ Bob is op weg naar huis! 115 | message: > 116 | Waze denkt dat hij om {{ (now() + timedelta(minutes=(3 + states("sensor.reistijd_bob_naar_huis") | int))).strftime("%H:%M") }} thuis is. 117 | data: 118 | alert_once: true 119 | car_ui: true 120 | clickAction: "/lovelace/locations" 121 | notification_icon: mdi:car-side 122 | persistent: true 123 | priority: high 124 | sticky: true 125 | tag: "waze" 126 | ttl: 0 127 | - action: notify.mobile_devices_adults 128 | data: 129 | message: "clear_notification" 130 | data: 131 | tag: "ask-waze" 132 | ttl: 0 133 | priority: high 134 | - action: automation.turn_on 135 | target: 136 | entity_id: automation.update_waze_travel_time_to_home 137 | 138 | # Waze will update my tavel time every 5 minutes, so I use this 139 | # to update the persistent notification 140 | - id: location_update_traveltime_notification_hmmbob 141 | alias: "Werk reistijd notificatie bij met nieuwe gegevens" 142 | triggers: 143 | - trigger: state 144 | entity_id: sensor.reistijd_bob_naar_huis 145 | conditions: 146 | - alias: "Check if we still think he's travelling home" 147 | condition: state 148 | entity_id: input_boolean.location_bob_travelling_home 149 | state: "on" 150 | actions: 151 | - alias: "Estimated time of arrival is updated, let's inform the people" 152 | action: notify.mobile_devices_adults 153 | data: 154 | title: ♥ Bob is op weg naar huis! 155 | message: > 156 | Waze denkt dat hij om {{ (now() + timedelta(minutes=(3 + states("sensor.reistijd_bob_naar_huis") | int))).strftime("%H:%M") }} thuis is. 157 | data: 158 | alert_once: true 159 | car_ui: true 160 | clickAction: "/lovelace/locations" 161 | notification_icon: mdi:car-side 162 | persistent: true 163 | priority: high 164 | sticky: true 165 | tag: "waze" 166 | ttl: 0 167 | 168 | # As the notifications are persistent (so, non-removable by the user), 169 | # we need to remove the notification when I'm home through HA. It also 170 | # turns off the automation that updates the Waze sensor. 171 | - id: location_clear_traveltime_notification 172 | alias: "Verwijder reistijd notificatie als ik weer thuis ben" 173 | triggers: 174 | - trigger: zone 175 | entity_id: device_tracker.sm_a556b 176 | event: enter 177 | zone: zone.home 178 | conditions: 179 | - alias: "Check if we still think he's travelling home" 180 | condition: state 181 | entity_id: input_boolean.location_bob_travelling_home 182 | state: "on" 183 | actions: 184 | - action: input_boolean.turn_off 185 | target: 186 | entity_id: input_boolean.location_bob_travelling_home 187 | - action: notify.mobile_devices_adults 188 | data: 189 | message: "clear_notification" 190 | data: 191 | tag: "waze" 192 | ttl: 0 193 | priority: high 194 | - action: automation.turn_off 195 | target: 196 | entity_id: automation.update_waze_travel_time_to_home 197 | 198 | ########################## 199 | ## EV Charger notifications 200 | ########################## 201 | - id: location_send_ev_charger_status 202 | alias: "Verstuur een melding om te laten weten of de laadpaal vrij is" 203 | triggers: 204 | - trigger: zone 205 | entity_id: device_tracker.sm_a556b 206 | event: enter 207 | zone: zone.laadpaal_waarschuwing 208 | actions: 209 | - variables: 210 | laadpalen_werk: 211 | - sensor.laadpaal_werk_1 212 | - sensor.laadpaal_werk_2 213 | laadpalen_extra: 214 | - sensor.laadpaal_werk_3 215 | - sensor.laadpaal_werk_4 216 | message: >- 217 | {{'Er is een laadpaal vrij bij het station!' if (laadpalen_werk | select('is_state', 'Available') | list | count > 0) 218 | else 'Er is een laadpaal vrij in de wijk!' if (laadpalen_extra | select('is_state', 'Available') | list | count > 0) 219 | else 'Helaas, geen laadpaal vrij.'}} 220 | - alias: "Sending push notification" 221 | action: notify.mobile_app_sm_a556b 222 | data: 223 | title: "Laadpaal" 224 | message: "{{ message }}" 225 | data: 226 | car_ui: true 227 | notification_icon: mdi:ev-station 228 | tag: "charger_available" 229 | ttl: 0 230 | priority: high 231 | -------------------------------------------------------------------------------- /packages/6 - Outside/air_quality.yaml: -------------------------------------------------------------------------------- 1 | air_quality_package: 2 | input_text: 3 | ################################## 4 | ## OpenSensebox SensorIDs 5 | ################################## 6 | opensensebox_sensorid_temp: 7 | name: Opensensebox temperature ID 8 | initial: !secret opensensebox_sensorid_temp 9 | 10 | opensensebox_sensorid_press: 11 | name: Opensensebox pressure ID 12 | initial: !secret opensensebox_sensorid_press 13 | 14 | opensensebox_sensorid_hum: 15 | name: Opensensebox humidity ID 16 | initial: !secret opensensebox_sensorid_hum 17 | 18 | opensensebox_sensorid_pm25: 19 | name: Opensensebox PM2.5 ID 20 | initial: !secret opensensebox_sensorid_pm25 21 | 22 | opensensebox_sensorid_pm10: 23 | name: Opensensebox PM10 ID 24 | initial: !secret opensensebox_sensorid_pm10 25 | 26 | rest_command: 27 | ################################## 28 | ## Push values to Air Quality APIs 29 | ################################## 30 | # The BME280 pressure value in HA is in hPa - the APIs expect it in Pa, hence the 31 | # multiplication of the value in the templates below. 32 | 33 | # Push to Luftdaten API. Luftdaten uses headers to distinguish between different sensor 34 | # types, so we need to push twice. The X-Sensor header contains the sensorID from Luftdaten, 35 | # typically formatted as esp8266-12345678 or similar. 36 | 37 | # Using the http endpoints, as the https endpoints error out more often. 38 | send_luftdaten_pm: 39 | url: https://api.sensor.community/v1/push-sensor-data/ 40 | method: POST 41 | content_type: "application/json" 42 | timeout: 20 43 | headers: 44 | X-Pin: 1 ## This tells Luftdaten that it is SDS011 data 45 | X-Sensor: !secret luftdaten_x_sensor 46 | payload: >- 47 | { 48 | "software_version": "HomeAssistant-{{ states('sensor.current_version') }}", 49 | "sensordatavalues":[ 50 | {"value_type":"P1","value":"{{ states('sensor.weerhuisje_particulate_matter_10_0_m_concentration') }}"}, 51 | {"value_type":"P2","value":"{{ states('sensor.weerhuisje_particulate_matter_2_5_m_concentration') }}"} 52 | ] 53 | } 54 | send_luftdaten_tph: 55 | url: https://api.sensor.community/v1/push-sensor-data/ 56 | method: POST 57 | content_type: "application/json" 58 | timeout: 20 59 | headers: 60 | X-Pin: 11 ## This tells Luftdaten that it is BME280 data 61 | X-Sensor: !secret luftdaten_x_sensor 62 | payload: >- 63 | { 64 | "software_version": "HomeAssistant-{{ states('sensor.current_version') }}", 65 | "sensordatavalues":[ 66 | {"value_type":"temperature","value":"{{ states('sensor.weerhuisje_temperature') }}"}, 67 | {"value_type":"pressure","value":"{{ ((states('sensor.weerhuisje_pressure') | float(default=0)) * 100) | round }}"}, 68 | {"value_type":"humidity","value":"{{ states('sensor.weerhuisje_humidity') }}"} 69 | ] 70 | } 71 | 72 | # Push to Madavi. This is related to Luftdaten and stores data for use in Grafana. 73 | send_madavi: 74 | url: https://api-rrd.madavi.de/data.php 75 | method: POST 76 | content_type: "application/json" 77 | headers: 78 | X-Pin: 0 79 | X-Sensor: !secret luftdaten_x_sensor 80 | payload: >- 81 | { 82 | "software_version": "HomeAssistant-{{ states('sensor.current_version') }}", 83 | "sensordatavalues":[ 84 | {"value_type":"SDS_P1","value":"{{ states('sensor.weerhuisje_particulate_matter_10_0_m_concentration') }}"}, 85 | {"value_type":"SDS_P2","value":"{{ states('sensor.weerhuisje_particulate_matter_2_5_m_concentration') }}"}, 86 | {"value_type":"BME280_temperature","value":"{{ states('sensor.weerhuisje_temperature') }}"}, 87 | {"value_type":"BME280_pressure","value":"{{ ((states('sensor.weerhuisje_pressure') | float(default=0)) * 100) | round }}"}, 88 | {"value_type":"BME280_humidity","value":"{{ states('sensor.weerhuisje_humidity') }}"} 89 | ] 90 | } 91 | 92 | # Push to OpenSenseBox / OpenSenseMap. The url !secret contains the openSenseBox API url, 93 | # which looks like https://api.opensensemap.org/boxes/<>/data 94 | # The input_text items contain the sensor-IDs you need to publish the data to the API. 95 | # You can find those on your SenseBox page on https://opensensemap.org/account 96 | # I use input_text to hide this sensitive information from Github. 97 | post_opensensebox: 98 | url: !secret opensensebox_api_url 99 | method: POST 100 | headers: 101 | content-type: "application/json; charset=utf-8" 102 | payload: >- 103 | { 104 | "{{ states('input_text.opensensebox_sensorid_pm25') }}": "{{ states('sensor.weerhuisje_particulate_matter_2_5_m_concentration') }}", 105 | "{{ states('input_text.opensensebox_sensorid_pm10') }}": "{{ states('sensor.weerhuisje_particulate_matter_10_0_m_concentration') }}", 106 | "{{ states('input_text.opensensebox_sensorid_temp') }}": "{{ states('sensor.weerhuisje_temperature') }}", 107 | "{{ states('input_text.opensensebox_sensorid_press') }}": "{{ ((states('sensor.weerhuisje_pressure') | float(default=0)) * 100) | round }}", 108 | "{{ states('input_text.opensensebox_sensorid_hum') }}": "{{ states('sensor.weerhuisje_humidity') }}" 109 | } 110 | 111 | automation: 112 | ################################## 113 | ## Push values to Air Quality APIs 114 | ################################## 115 | # Sensor uses a NodeMCUv2 and SDS011+BME280 sensors. NodeMCU is flashed with ESPHome 116 | # software. SDS011 updates every 30 mins, the BME280 every 5 minutes. 117 | - id: weerhuisje_update_air_quality_sensors 118 | alias: "Stuur Air Quality sensors van het weerhuisje door" 119 | mode: queued 120 | triggers: 121 | - trigger: time_pattern 122 | minutes: "/1" 123 | conditions: 124 | not: 125 | - "{{ states('sensor.weerhuisje_particulate_matter_2_5_m_concentration') in ['unknown','unavailable'] }}" 126 | - "{{ states('sensor.weerhuisje_particulate_matter_10_0_m_concentration') in ['unknown','unavailable'] }}" 127 | - "{{ states('sensor.weerhuisje_temperature') in ['unknown','unavailable'] }}" 128 | - "{{ states('sensor.weerhuisje_humidity') in ['unknown','unavailable'] }}" 129 | - "{{ states('sensor.weerhuisje_pressure') in ['unknown','unavailable'] }}" 130 | actions: 131 | - alias: "Send TPH to Luftdaten / Sensor.Community API" 132 | action: rest_command.send_luftdaten_tph 133 | continue_on_error: true 134 | - alias: "Send data to OpenSenseMap" 135 | action: rest_command.post_opensensebox 136 | continue_on_error: true 137 | - alias: "Send updates to Madavi.de for statistics." 138 | action: rest_command.send_madavi 139 | continue_on_error: true 140 | - alias: "Send PM to Luftdaten / Sensor.Community API" 141 | action: rest_command.send_luftdaten_pm 142 | continue_on_error: true 143 | -------------------------------------------------------------------------------- /packages/6 - Outside/bikeshed.yaml: -------------------------------------------------------------------------------- 1 | bikeshed_package: 2 | alert: 3 | ############################# 4 | ## Bikeshed door alert # 5 | ############################# 6 | bikeshed_door: 7 | name: "Fietsenhok deur" 8 | title: "ALARM:" 9 | message: "Het fietsenhok staat nog open" 10 | entity_id: binary_sensor.alert_bikeshed_door 11 | state: "on" 12 | repeat: 5 13 | can_acknowledge: true 14 | skip_first: false 15 | notifiers: 16 | - mobile_app_sm_a556b 17 | data: 18 | tag: bikeshed_door_alert 19 | ttl: 0 20 | channel: alerts # For devices on Android 8.0+ only 21 | priority: high 22 | ledColor: "red" # Set the LED to red 23 | actions: 24 | - action: "mute_alert_bikeshed" 25 | title: "Alert dempen" 26 | 27 | input_boolean: 28 | notify_door_alert: 29 | name: "Deur alarm" 30 | icon: mdi:door-open 31 | 32 | template: 33 | - binary_sensor: 34 | - name: "Alert bikeshed door" 35 | unique_id: alert_bikeshed_door 36 | delay_on: "00:05:00" 37 | state: >- 38 | {{ is_state('binary_sensor.fietsenhok_contact', 'on') 39 | and is_state('input_boolean.notify_door_alert', 'on') }} 40 | 41 | automation: 42 | - alias: "Verwijder fietsenhok alert" 43 | id: clear_bikeshed_door_alert 44 | trigger: 45 | - platform: state 46 | entity_id: alert.bikeshed_door 47 | from: "on" 48 | to: 49 | - "idle" 50 | - "off" 51 | action: 52 | - service: notify.mobile_devices_adults 53 | data: 54 | message: clear_notification 55 | data: 56 | tag: bikeshed_door_alert 57 | 58 | - alias: "Verwerk actie om alert uit te zetten" 59 | id: mute_door_alerts 60 | trigger: 61 | - platform: event 62 | event_type: mobile_app_notification_action 63 | event_data: 64 | action: "mute_alert_bikeshed" 65 | action: 66 | - service: alert.turn_off 67 | target: 68 | entity_id: alert.bikeshed_door 69 | 70 | - id: schuur_fietslader 71 | alias: Fietsaccu lader in de schuur uitschakelen na laden 72 | description: Fietsaccu lader in de schuur uitschakelen na laden 73 | mode: single 74 | triggers: 75 | - trigger: numeric_state 76 | entity_id: sensor.fietslader_links_power 77 | for: 78 | minutes: 5 79 | below: 5 80 | variables: 81 | switch: switch.fietslader_links 82 | - trigger: numeric_state 83 | entity_id: sensor.fietslader_rechts_power 84 | for: 85 | minutes: 5 86 | below: 5 87 | variables: 88 | switch: switch.fietslader_rechts 89 | conditions: 90 | - alias: "Please, not on restarts" 91 | condition: template 92 | value_template: "{{ trigger.from_state.state | is_number }}" 93 | actions: 94 | - alias: "Lader uitschakelen" 95 | action: switch.turn_off 96 | target: 97 | entity_id: "{{ switch }}" 98 | - alias: "Sending push notification" 99 | action: notify.mobile_app_sm_a556b 100 | data: 101 | title: "Fietslader uitgeschakeld" 102 | message: "De {{ state_attr(switch, 'friendly_name') }} is automatisch uitgeschakeld ({{ now().strftime('%H:%M') }})" 103 | data: 104 | notification_icon: mdi:bicycle-electric 105 | ttl: 0 106 | priority: high 107 | -------------------------------------------------------------------------------- /packages/6 - Outside/ev.yaml: -------------------------------------------------------------------------------- 1 | ev_package: 2 | input_number: 3 | ev_target_soc: 4 | name: EV Target SOC 5 | min: 0 6 | max: 100 7 | step: 5 8 | unit_of_measurement: "%" 9 | 10 | utility_meter: 11 | ev_charged_energy: 12 | cycle: monthly 13 | name: SmartEVSE Monthly total 14 | source: sensor.smartevse_6360_evtotalenergycharged 15 | always_available: true 16 | 17 | template: 18 | - trigger: 19 | # This generates triggers for all changes in the entity, both in its state and its attributes. 20 | - trigger: state 21 | entity_id: sensor.zonneplan_current_electricity_tariff 22 | # This ensures the first data is filled. 23 | - trigger: event 24 | event_type: event_template_reloaded 25 | sensor: 26 | - name: "Zonneplan template price sensor" 27 | unique_id: zonneplan_template_price_sensor 28 | unit_of_measurement: "€/kWh" 29 | state: "{{ states('sensor.zonneplan_current_electricity_tariff') }}" 30 | availability: "{{ 'sensor.zonneplan_current_electricity_tariff' | has_value }}" 31 | attributes: 32 | prices_today: > 33 | {%- set forecast = state_attr('sensor.zonneplan_current_electricity_tariff', 'forecast') %} 34 | {%- set time_key = 'datetime' %} 35 | {%- set price_key = 'electricity_price' %} 36 | {%- set ns = namespace(data=[]) %} 37 | {%- for i in forecast | default([], true) if as_local(as_datetime(i[time_key])).date() == now().date() %} 38 | {%- set ns.data = ns.data + [dict(time= as_local(as_datetime(i[time_key])).isoformat(), price = i[price_key] / 10000000 )] %} 39 | {%- endfor %} 40 | {{ ns.data }} 41 | prices_tomorrow: > 42 | {%- set forecast = state_attr('sensor.zonneplan_current_electricity_tariff', 'forecast') %} 43 | {%- set time_key = 'datetime' %} 44 | {%- set price_key = 'electricity_price' %} 45 | {%- set ns = namespace(data=[]) %} 46 | {%- for i in forecast | default([], true) if as_local(as_datetime(i[time_key])).date() == (now()+timedelta(days=1)).date() %} 47 | {%- set ns.data = ns.data + [dict(time= as_local(as_datetime(i[time_key])).isoformat(), price = i[price_key] / 10000000 )] %} 48 | {%- endfor %} 49 | {{ ns.data }} 50 | 51 | automation: 52 | - id: ev_handle_automatic_cheapest_charge 53 | alias: "Laad de auto tijdens de goedkoopste uren" 54 | description: "Automatically charge my car in the cheapest hours" 55 | mode: single 56 | triggers: 57 | - trigger: state 58 | entity_id: sensor.ev_smart_charging_charging 59 | to: "on" 60 | from: "off" 61 | id: ev_cheapest_charge_start 62 | - trigger: state 63 | entity_id: sensor.ev_smart_charging_charging 64 | to: "off" 65 | from: "on" 66 | id: ev_cheapest_charge_stop 67 | actions: 68 | - alias: "Choose to start or stop charging" 69 | choose: 70 | - conditions: 71 | - condition: trigger 72 | id: ev_cheapest_charge_start 73 | sequence: 74 | - alias: "Select SMART charging option" 75 | action: select.select_option 76 | target: 77 | entity_id: select.smartevse_6360_mode 78 | data: 79 | option: Smart 80 | - alias: "Sending push notification" 81 | action: notify.mobile_app_sm_a556b 82 | data: 83 | title: "Automatic cheapest EV charging started" 84 | message: "Automatisch laden van de auto is gestart. ({{ now().strftime('%H:%M') }})." 85 | data: 86 | notification_icon: mdi:ev-station 87 | ttl: 0 88 | priority: high 89 | clickAction: "/lovelace/car" 90 | - conditions: 91 | - condition: trigger 92 | id: ev_cheapest_charge_stop 93 | sequence: 94 | - alias: "Select charging option OFF" 95 | action: select.select_option 96 | target: 97 | entity_id: select.smartevse_6360_mode 98 | data: 99 | option: "Off" 100 | - alias: "Sending push notification" 101 | action: notify.mobile_app_sm_a556b 102 | data: 103 | title: "Automatic cheapest EV charging stopped" 104 | message: "Automatisch laden van de auto is gestopt ({{ now().strftime('%H:%M') }})" 105 | data: 106 | notification_icon: mdi:ev-station 107 | ttl: 0 108 | priority: high 109 | clickAction: "/lovelace/car" 110 | 111 | - alias: "Stel in of de auto verbonden is" 112 | id: "ev_set_smart_charging_connected_sensor" 113 | description: "Set Smart Charging EV connected sensor" 114 | mode: single 115 | triggers: 116 | - trigger: state 117 | entity_id: sensor.smartevse_6360_evplugstate 118 | actions: 119 | - if: 120 | - condition: state 121 | entity_id: sensor.smartevse_6360_evplugstate 122 | state: "Connected" 123 | then: 124 | - action: switch.turn_on 125 | target: 126 | entity_id: switch.ev_smart_charging_ev_connected 127 | else: 128 | - if: 129 | - condition: state 130 | entity_id: sensor.smartevse_6360_evplugstate 131 | state: "Disconnected" 132 | then: 133 | - action: switch.turn_off 134 | target: 135 | entity_id: switch.ev_smart_charging_ev_connected 136 | 137 | - id: ev_create_monthly_total_notification 138 | alias: "Stuur een maandelijks overzicht van de laadkosten van de auto" 139 | description: "Create a monthly overview of the amount of energy charged for billing purposes" 140 | mode: single 141 | variables: 142 | title: EV charging monthly total 143 | message: > 144 | This month you have charged your EV with a total of {{ states('sensor.smartevse_monthly_total') | round(1) }} kWh. 145 | The total meter reading at {{now().strftime("%d-%m-%Y %H:%M")}} was {{ states('sensor.smartevse_6360_evtotalenergycharged') | round(1) }} kWh. 146 | triggers: 147 | - trigger: time 148 | at: "23:59:45" 149 | conditions: 150 | - alias: "Only on last day of the month" 151 | condition: template 152 | value_template: "{{ (now() + timedelta(days=1)).strftime('%-d') == '1' }}" 153 | actions: 154 | - alias: "Create a persistant notification with the monthly charged totals" 155 | action: persistent_notification.create 156 | data: 157 | notification_id: ev_monthly_total 158 | title: "{{ title }}" 159 | message: "{{ message }}" 160 | - alias: "Send an email with the monthly charged totals" 161 | action: notify.email 162 | data: 163 | title: "{{ title }}" 164 | message: "{{ message }}" 165 | 166 | - id: ev_force_update_while_charging 167 | alias: "Forceer nieuwe Hyundai informatie tijdens het laden" 168 | description: "Force update the values of the Hyundai component while charging" 169 | mode: single 170 | triggers: 171 | - trigger: time_pattern 172 | minutes: "/15" 173 | conditions: 174 | - alias: "Only when we are actually charging" 175 | condition: state 176 | entity_id: sensor.smartevse_6360_state 177 | state: "Charging" 178 | actions: 179 | - action: kia_uvo.force_update 180 | data: 181 | device_id: 5a94e1b7fbce614053e4f5b8dfd6209b 182 | -------------------------------------------------------------------------------- /packages/6 - Outside/garden.yaml: -------------------------------------------------------------------------------- 1 | lights_garden_package: 2 | group: 3 | lampen_tuin: 4 | name: Verlichting tuin 5 | icon: mdi:coach-lamp 6 | entities: 7 | - light.tuin_wandverlichting_muren 8 | - light.tuin_wandverlichting_schutting 9 | 10 | input_boolean: 11 | garden_lights_override: 12 | name: "Tuinverlichting override" 13 | 14 | sensor: 15 | - platform: schedule_state 16 | name: Garden lights 17 | default_state: "off" 18 | events: 19 | - start: "6:30" 20 | end: "{{ as_timestamp(state_attr('sun.sun', 'next_rising')) }}" 21 | state: "on" 22 | condition: "{{ (state_attr('sun.sun', 'next_rising') | as_datetime | as_local).time() > today_at('06:30').time() }}" 23 | - start: "{{ as_timestamp(state_attr('sun.sun', 'next_setting')) }}" 24 | end: "22:30" 25 | state: "on" 26 | 27 | automation: 28 | - id: garden_turn_on 29 | alias: "Zet de tuinverlichting aan of uit" 30 | mode: single 31 | max_exceeded: silent 32 | triggers: 33 | - trigger: state 34 | entity_id: sensor.garden_lights 35 | - trigger: homeassistant 36 | event: start 37 | - trigger: event 38 | event_type: automation_reloaded 39 | conditions: 40 | - alias: "Do we have a valid state" 41 | condition: template 42 | value_template: "{{ states('sensor.garden_lights') not in ['unknown','unavailable','none'] }}" 43 | - alias: "Only continue if not overridden" 44 | condition: state 45 | entity_id: input_boolean.garden_lights_override 46 | state: "off" 47 | actions: 48 | - action: homeassistant.turn_{{ states('sensor.garden_lights') }} 49 | target: 50 | entity_id: 51 | - group.lampen_tuin 52 | - light.tuin_spot_boom 53 | 54 | - id: garden_turn_on_coming_home 55 | alias: "Zet de tuinverlichting aan als ik thuis kom" 56 | mode: single 57 | max_exceeded: silent 58 | triggers: 59 | - trigger: state 60 | entity_id: binary_sensor.poort_contact 61 | from: "off" 62 | to: "on" 63 | - trigger: state 64 | entity_id: group.beweging_achtertuin 65 | from: "off" 66 | to: "on" 67 | conditions: 68 | - alias: "Are the lights off?" 69 | condition: state 70 | entity_id: group.lampen_tuin 71 | state: "off" 72 | - alias: "Is the sun down?" 73 | condition: state 74 | entity_id: sun.sun 75 | state: "below_horizon" 76 | actions: 77 | - action: input_boolean.turn_on 78 | target: 79 | entity_id: input_boolean.garden_lights_override 80 | - action: homeassistant.turn_on 81 | target: 82 | entity_id: group.lampen_tuin 83 | - delay: "00:03:00" 84 | - action: input_boolean.turn_off 85 | target: 86 | entity_id: input_boolean.garden_lights_override 87 | - action: automation.trigger 88 | target: 89 | entity_id: automation.lights_garden_turn_on 90 | 91 | - id: backgate_alert 92 | alias: "Waarschuw als iemand door de poort komt of het fietsenhok opent" 93 | description: "Alert when someone enters the backgate of our garden or opens the bike shed" 94 | mode: single 95 | max_exceeded: silent 96 | trace: 97 | stored_traces: 20 98 | triggers: 99 | - trigger: state 100 | entity_id: 101 | - binary_sensor.poort_contact 102 | - binary_sensor.fietsenhok_contact 103 | from: "off" 104 | to: "on" 105 | actions: 106 | - alias: "Turn on speaker" 107 | action: switch.turn_on 108 | target: 109 | entity_id: switch.alarmspeaker_alarm 110 | # Sometimes the trigger fires multiple times in short period. The next step 111 | # prevents multiple alerts in combination with 'mode: single' & 'max_exceeded: silent' 112 | - alias: "Do nothing for 10 seconds to prevent bouncing triggers" 113 | delay: "00:10:00" 114 | 115 | - id: "achtertuin_stream_to_kiosk" 116 | alias: Stream de achtertuin naar de kiosks 117 | mode: single 118 | max_exceeded: silent 119 | triggers: 120 | - trigger: state 121 | entity_id: binary_sensor.achtertuin_persoon 122 | from: "off" 123 | to: "on" 124 | actions: 125 | - action: browser_mod.popup 126 | data: 127 | dismissable: true 128 | autoclose: true 129 | browser_id: 130 | - kiosk1 131 | - kiosk2 132 | timeout: 90000 133 | size: fullscreen 134 | content: 135 | type: custom:advanced-camera-card 136 | cameras: 137 | - camera_entity: camera.achtertuin_vloeiend 138 | - action: number.set_value 139 | data: 140 | value: "255" 141 | target: 142 | entity_id: 143 | - number.kiosk1_schermhelderheid 144 | - number.kiosk2_schermhelderheid 145 | - alias: "Do nothing for 92 seconds to prevent bouncing triggers" 146 | delay: "00:01:32" 147 | -------------------------------------------------------------------------------- /packages/6 - Outside/knmi_weeralarm.yaml: -------------------------------------------------------------------------------- 1 | knmi_weeralarm_package: 2 | binary_sensor: 3 | - platform: meteoalarm 4 | country: "netherlands" 5 | province: "Brabant" 6 | language: "nl-NL" 7 | -------------------------------------------------------------------------------- /packages/6 - Outside/light_frontdoor.yaml: -------------------------------------------------------------------------------- 1 | light_frontdoor_package: 2 | automation: 3 | - id: lights_frontdoor 4 | alias: "Zet de voordeurlamp aan of uit" 5 | triggers: 6 | - trigger: sun 7 | event: sunset 8 | offset: "-00:10:00" 9 | variables: 10 | action: turn_on 11 | - trigger: sun 12 | event: sunrise 13 | variables: 14 | action: turn_off 15 | actions: 16 | - action: switch.{{ action }} 17 | target: 18 | entity_id: switch.voordeur 19 | -------------------------------------------------------------------------------- /packages/6 - Outside/shed.yaml: -------------------------------------------------------------------------------- 1 | shed_package: 2 | automation: 3 | - id: lights_schuur 4 | alias: "Zet de verlichting van de schuur aan of uit" 5 | mode: restart 6 | max_exceeded: silent 7 | triggers: 8 | - trigger: state 9 | entity_id: binary_sensor.pir_schuur_occupancy 10 | to: "on" 11 | from: "off" 12 | variables: 13 | action: turn_on 14 | - trigger: state 15 | entity_id: binary_sensor.pir_schuur_occupancy 16 | to: "off" 17 | from: "on" 18 | variables: 19 | action: turn_off 20 | conditions: [] 21 | actions: 22 | - alias: "Lamp schuur bedienen..." 23 | action: switch.{{ action }} 24 | target: 25 | entity_id: switch.schuur 26 | -------------------------------------------------------------------------------- /packages/6 - Outside/solar.yaml: -------------------------------------------------------------------------------- 1 | solar_package: 2 | binary_sensor: 3 | # Check if the current electricity prices are negative 4 | # on == negative price, off == positive price 5 | - platform: threshold 6 | name: "Negatieve stroomprijs" 7 | entity_id: sensor.zonneplan_current_electricity_tariff 8 | lower: 0 9 | 10 | input_boolean: 11 | # Do I want the PV to turn off automatically? 12 | solar_pv_off_automatic: 13 | name: "Solar: Turn PV off automatically" 14 | icon: mdi:refresh-auto 15 | # Do I want the PV to turn off by schedule? 16 | solar_pv_off_schedule: 17 | name: "Solar: Turn PV off on schedule" 18 | icon: mdi:calendar-start 19 | 20 | input_datetime: 21 | # When should PV off period stop (and turn on PV) 22 | solar_pv_off_end: 23 | name: "Solar PV off time end" 24 | has_time: true 25 | has_date: true 26 | icon: mdi:clock-end 27 | # When should PV off period start (and turn off PV) 28 | solar_pv_off_start: 29 | name: "Solar PV off time start" 30 | has_time: true 31 | has_date: true 32 | icon: mdi:clock-start 33 | 34 | sensor: 35 | - platform: template 36 | sensors: 37 | todays_total_production_preserved: 38 | friendly_name: Todays total production preserved 39 | unit_of_measurement: "kWh" 40 | value_template: >- 41 | {% if states('sensor.today_s_pv_generation') not in ['unknown', 'unavailable'] %} 42 | {{ states('sensor.today_s_pv_generation') | float(0) }} 43 | {% else %} 44 | {{ states('sensor.todays_total_production_preserved') | float(0) }} 45 | {% endif %} 46 | 47 | rest_command: 48 | # Rest Command to upload PV generation data to PVOutput 49 | update_pvoutput: 50 | url: https://pvoutput.org/service/r2/addstatus.jsp 51 | method: post 52 | content_type: "application/x-www-form-urlencoded" 53 | headers: 54 | X-Pvoutput-Apikey: !secret pvoutput_api_key 55 | X-Pvoutput-SystemId: !secret pvoutput_system_id 56 | payload: >- 57 | d={{now().strftime("%Y%m%d")}} 58 | &t={{now().strftime("%H:%M")}} 59 | &v1={{(states('sensor.today_s_pv_generation')|float(0))*1000}} 60 | &v2={{(states('sensor.pv_power')|float(0))|round(0)}} 61 | &v5={{states('sensor.knmi_temperatuur')|float(0)}} 62 | &v6={{states('sensor.on_grid_l1_voltage')|float(0)}} 63 | 64 | automation: 65 | # Automation to trigger the upload to PVOutput, using the rest_command defined above 66 | - id: solar_upload_to_pvoutput 67 | alias: "Stuur solar informatie naar PVOutput" 68 | description: Upload values to PVOutput 69 | triggers: 70 | - trigger: time_pattern 71 | minutes: /5 72 | seconds: "0" 73 | conditions: 74 | - condition: state 75 | entity_id: sensor.work_mode 76 | state: "Normal" 77 | actions: 78 | - action: rest_command.update_pvoutput 79 | data: {} 80 | mode: single 81 | 82 | - id: solar_handle_pv_off 83 | alias: "Zet de zonnepanelen uit" 84 | description: >- 85 | Automation to automatically turn off my solar system when electricity prices are below 0. 86 | This can be done automatically or by time schedule based on input_datetime. 87 | It works by setting the "grid_export_limit" in the GoodWe integration to 0%, effectively 88 | instructing the inverter that it isn't allowed to export (produce) any power. Setting 89 | it back to 100% restarts the production again to the maximum capacity of the inverter. 90 | triggers: 91 | # Triggers for automatic switching 92 | - trigger: state 93 | entity_id: 94 | - binary_sensor.negatieve_stroomprijs 95 | attribute: position 96 | to: below 97 | from: above 98 | id: automatic_start 99 | variables: 100 | message: "Je zonnepanelen zijn automatisch uitgeschakeld omdat de stroomprijs negatief is." 101 | - trigger: state 102 | entity_id: 103 | - binary_sensor.negatieve_stroomprijs 104 | attribute: position 105 | to: above 106 | from: below 107 | id: automatic_stop 108 | variables: 109 | message: "Je zonnepanelen zijn weer ingeschakeld omdat de stroomprijs positief is." 110 | # Triggers for scheduled switching 111 | - trigger: time 112 | at: input_datetime.solar_pv_off_start 113 | id: scheduled_start 114 | variables: 115 | message: "Je zonnepanelen zijn uitgeschakeld op basis van je schedule." 116 | - trigger: time 117 | at: input_datetime.solar_pv_off_end 118 | id: scheduled_stop 119 | variables: 120 | message: "Je zonnepanelen zijn weer ingeschakeld op basis van je schedule." 121 | conditions: 122 | - alias: "Check if inverter is actually working" 123 | condition: state 124 | entity_id: sensor.work_mode 125 | state: "Normal" 126 | actions: 127 | - alias: "Choose what to execute" 128 | choose: 129 | - conditions: 130 | - condition: trigger 131 | id: automatic_start 132 | sequence: 133 | - if: 134 | - alias: "Check if we enabled automatic turning on/off" 135 | condition: state 136 | entity_id: input_boolean.solar_pv_off_automatic 137 | state: "on" 138 | then: 139 | - alias: "Set grid export limit to 0% to turn off PV production" 140 | action: number.set_value 141 | target: 142 | entity_id: number.grid_export_limit 143 | data: 144 | value: "0" 145 | else: 146 | - stop: "Stopping because automatic turning on/off is not enabled" 147 | - conditions: 148 | - condition: trigger 149 | id: automatic_stop 150 | sequence: 151 | - if: 152 | - alias: "Check if we enabled automatic turning on/off" 153 | condition: state 154 | entity_id: input_boolean.solar_pv_off_automatic 155 | state: "on" 156 | then: 157 | - alias: "Set grid export limit to 100% to turn on PV production" 158 | action: number.set_value 159 | target: 160 | entity_id: number.grid_export_limit 161 | data: 162 | value: "100" 163 | else: 164 | - stop: "Stopping because automatic turning on/off is not enabled" 165 | - conditions: 166 | - condition: trigger 167 | id: scheduled_start 168 | sequence: 169 | - if: 170 | - alias: "Check if we enabled scheduled turning on/off" 171 | condition: state 172 | entity_id: input_boolean.solar_pv_off_schedule 173 | state: "on" 174 | then: 175 | - alias: "Set grid export limit to 0% to turn off PV production" 176 | action: number.set_value 177 | target: 178 | entity_id: number.grid_export_limit 179 | data: 180 | value: "0" 181 | else: 182 | - stop: "Stopping because scheduled turning on/off is not enabled" 183 | - conditions: 184 | - condition: trigger 185 | id: scheduled_stop 186 | sequence: 187 | - if: 188 | - alias: "Check if we enabled scheduled turning on/off" 189 | condition: state 190 | entity_id: input_boolean.solar_pv_off_schedule 191 | state: "on" 192 | then: 193 | - alias: "Set grid export limit to 100% to turn on PV production" 194 | action: number.set_value 195 | target: 196 | entity_id: number.grid_export_limit 197 | data: 198 | value: "100" 199 | - alias: "Disable PV off schedule" 200 | action: input_boolean.turn_off 201 | target: 202 | entity_id: input_boolean.solar_pv_off_schedule 203 | else: 204 | - stop: "Stopping because scheduled turning on/off is not enabled" 205 | - alias: "Sending push notification" 206 | action: notify.mobile_app_sm_a556b 207 | data: 208 | title: "Zonnepanelen update" 209 | message: "{{ message }}" 210 | data: 211 | tag: "notification-solar" 212 | notification_icon: mdi:solar-power-variant 213 | ttl: 0 214 | priority: high 215 | -------------------------------------------------------------------------------- /packages/6 - Outside/trash.yaml: -------------------------------------------------------------------------------- 1 | trash_package: 2 | input_boolean: 3 | notify_trash: 4 | name: "Push-meldingen over afval" 5 | icon: mdi:message-bulleted 6 | notify_trash_voice: 7 | name: "Voice-meldingen over afval" 8 | icon: mdi:account-voice 9 | trash_outside: 10 | name: "Afval naar buiten gebracht" 11 | 12 | input_datetime: 13 | time_trash_warning_today: 14 | name: Melding afval vandaag 15 | has_time: true 16 | time_trash_warning_tomorrow: 17 | name: Melding afval morgen 18 | has_time: true 19 | 20 | input_text: 21 | trash_url_gft: 22 | name: Trash URL GFT 23 | initial: !secret image_url_gft 24 | 25 | trash_url_papier: 26 | name: Trash URL papier 27 | initial: !secret image_url_oudpapier 28 | 29 | trash_url_pbd: 30 | name: Trash URL plastic 31 | initial: !secret image_url_plastic 32 | 33 | trash_url_pbdpapier: 34 | name: Trash URL plastic en papier 35 | initial: !secret image_url_plasticpapier 36 | trash_url_papierpbd: 37 | name: Trash URL papier en plastic 38 | initial: !secret image_url_plasticpapier 39 | 40 | trash_url_restafval: 41 | name: Trash URL restafval 42 | initial: !secret image_url_restafval 43 | 44 | template: 45 | sensor: 46 | - name: Afvalinfo volgende inzameling en datum 47 | unique_id: afvalinfo_home_next_trash_type_and_date 48 | state: >- 49 | {% set ns = namespace(minimum=365) %} 50 | {% set list = ['gft', 'pbd', 'papier', 'restafval'] %} 51 | {% set friendly_list = ['GFT', 'PBD', 'Oud Papier', 'Restafval'] %} 52 | {%- for l in list %} 53 | {%- set days = state_attr('sensor.afvalinfo_home_' ~l, 'days_until_collection_date')%} 54 | {%- if days != None and days < ns.minimum %} 55 | {%- set ns.minimum = days %} 56 | {%- endif %} 57 | {%- endfor %} 58 | {%- for l in list %} 59 | {%- set days = state_attr('sensor.afvalinfo_home_' ~l, 'days_until_collection_date')%} 60 | {%- if days == ns.minimum %} 61 | {{friendly_list[loop.index0]}} · {{ states('sensor.afvalinfo_home_' ~l) }} 62 | {%- endif %} 63 | {%- endfor %} 64 | 65 | automation: 66 | ########################## 67 | ## Trash notifications 68 | ########################## 69 | - alias: "Verstuur melding welk afval opgehaald wordt" 70 | id: afval_meldingen 71 | triggers: 72 | - trigger: time 73 | at: input_datetime.time_trash_warning_today 74 | id: vandaag 75 | - trigger: time 76 | at: input_datetime.time_trash_warning_tomorrow 77 | id: morgen 78 | variables: 79 | sensor: "sensor.afvalinfo_home_{{ trigger.id }}" 80 | trash_descr: 81 | PBD: "plastic" 82 | GFT: "GFT" 83 | Restafval: "restafval" 84 | Papier: "oud papier" 85 | "PBD, Papier": "plastic en oud papier" 86 | "Papier, PBD": "plastic en oud papier" 87 | afval: > 88 | {{ trash_descr.get(states(sensor), "onbekend") }} 89 | conditions: 90 | - alias: "Do we want notifications?" 91 | condition: state 92 | entity_id: input_boolean.notify_trash 93 | state: "on" 94 | - alias: "Do we have a valid state" 95 | condition: template 96 | value_template: "{{ states(sensor) not in ['unknown','unavailable','none','geen'] }}" 97 | actions: 98 | - if: 99 | - '{{trigger.id == "morgen" }}' 100 | then: 101 | - alias: "New round of notifications, so resetting helper for next round" 102 | action: input_boolean.turn_off 103 | target: 104 | entity_id: input_boolean.trash_outside 105 | - if: 106 | - '{{trigger.id == "vandaag" }}' 107 | - alias: "Check if trash is outside already" 108 | condition: state 109 | entity_id: input_boolean.trash_outside 110 | state: "on" 111 | then: 112 | - stop: "Stopping notification sequence as trash is already outside" 113 | else: 114 | - alias: "Sending push notification" 115 | action: notify.mobile_app_sm_a556b 116 | data: 117 | title: "Afvalinzameling" 118 | message: "{{ trigger.id | capitalize }} wordt het {{ afval }} opgehaald." 119 | data: 120 | tag: "notification-trash" 121 | notification_icon: mdi:delete 122 | actions: 123 | - action: "trash_outside" 124 | title: "Jep, staat buiten!" 125 | ttl: 0 126 | priority: high 127 | - alias: "Check if TTS should be played" 128 | condition: state 129 | entity_id: input_boolean.notify_trash_voice 130 | state: "on" 131 | - action: media_player.volume_set 132 | data: 133 | entity_id: media_player.kiosk1_fkb 134 | volume_level: 0.9 135 | - alias: "Play TTS" 136 | action: tts.microsoft_say 137 | entity_id: media_player.kiosk1_fkb 138 | data: 139 | message: "{{ trigger.id }} wordt het {{ afval }} opgehaald." 140 | - action: browser_mod.popup 141 | data: 142 | dismissable: true 143 | autoclose: false 144 | browser_id: 145 | - kiosk1 146 | - kiosk2 147 | timeout: 60000 148 | size: fullscreen 149 | content: 150 | type: picture 151 | image: "{{ states('input_text.trash_url_' ~ states(sensor).replace(' ', '')) }}" 152 | card_mod: 153 | style: 154 | ha-dialog$: | 155 | div.mdc-dialog .mdc-dialog__container .mdc-dialog__surface { 156 | background: black !important; 157 | border: none !important; 158 | border-style: solid !important; 159 | border-color: black !important; 160 | } 161 | 162 | - alias: "Verwerk dat het afval buitengezet is" 163 | id: afval_process_reminder_status 164 | triggers: 165 | - trigger: event 166 | event_type: mobile_app_notification_action 167 | event_data: 168 | action: "trash_outside" 169 | actions: 170 | - action: input_boolean.turn_on 171 | target: 172 | entity_id: input_boolean.trash_outside 173 | -------------------------------------------------------------------------------- /packages/9 - General/airco.yaml: -------------------------------------------------------------------------------- 1 | airco_package: 2 | input_datetime: 3 | time_turn_off_airco_livingroom: 4 | name: Airco woonkamer uit 5 | has_time: true 6 | 7 | timer: 8 | airco_mini_sleeptimer: 9 | restore: true 10 | airco_puber_sleeptimer: 11 | restore: true 12 | 13 | automation: 14 | ########################################### 15 | ## Sleeptimer for kids aircos # 16 | ########################################### 17 | - id: airco_kinderen_start_on_timer_start 18 | alias: "Start de airco van de kinderen als de timer start" 19 | description: "Turn on the AC when the timer starts" 20 | triggers: 21 | - trigger: event 22 | event_type: timer.started 23 | event_data: 24 | entity_id: timer.airco_mini_sleeptimer 25 | variables: 26 | airco: climate.airco_slaapkamer_t 27 | temp_sensor: sensor.xiaomi_temperature_humidity_sensor_3_temperature 28 | - trigger: event 29 | event_type: timer.started 30 | event_data: 31 | entity_id: timer.airco_puber_sleeptimer 32 | variables: 33 | airco: climate.airco_slaapkamer_m 34 | temp_sensor: sensor.xiaomi_temperature_humidity_sensor_4_temperature 35 | actions: 36 | - action: climate.set_hvac_mode 37 | target: 38 | entity_id: "{{airco}}" 39 | data: 40 | hvac_mode: "{{ 'heat' if (states(temp_sensor) | float(0)) < 21 else 'cool' }}" 41 | 42 | - id: airco_sleeptimer_kinderen 43 | alias: "Sleeptimer voor de aircos van de kinderen" 44 | description: "Turn off AC at the end of the timer" 45 | triggers: 46 | - trigger: event 47 | event_type: timer.finished 48 | event_data: 49 | entity_id: timer.airco_mini_sleeptimer 50 | variables: 51 | entity: climate.airco_slaapkamer_t 52 | - trigger: event 53 | event_type: timer.finished 54 | event_data: 55 | entity_id: timer.airco_puber_sleeptimer 56 | variables: 57 | entity: climate.airco_slaapkamer_m 58 | actions: 59 | - action: climate.set_hvac_mode 60 | target: 61 | entity_id: "{{entity}}" 62 | data: 63 | hvac_mode: "off" 64 | 65 | ########################################### 66 | ## Automatic shut down of aircos # 67 | ########################################### 68 | - id: airco_automatisch_uit 69 | alias: "Zet airco automatisch uit einde avond" 70 | description: "Turn off ACs automatically so we won't forget" 71 | triggers: 72 | - trigger: time 73 | at: "23:00:00" 74 | variables: 75 | target: airco_children 76 | - trigger: time 77 | at: input_datetime.time_turn_off_airco 78 | variables: 79 | target: climate.airco_woonkamer 80 | actions: 81 | - choose: 82 | - conditions: "{{ target == 'airco_children' }}" 83 | sequence: 84 | - if: 85 | - "{{ states('timer.airco_mini_sleeptimer') != 'active' }}" 86 | then: 87 | - action: climate.set_hvac_mode 88 | target: 89 | entity_id: climate.airco_slaapkamer_t 90 | data: 91 | hvac_mode: "off" 92 | - if: 93 | - "{{ states('timer.airco_puber_sleeptimer') != 'active' }}" 94 | then: 95 | - action: climate.set_hvac_mode 96 | target: 97 | entity_id: climate.airco_slaapkamer_m 98 | data: 99 | hvac_mode: "off" 100 | - conditions: "{{ target == 'climate.airco_woonkamer' }}" 101 | sequence: 102 | - action: climate.set_hvac_mode 103 | target: 104 | entity_id: "{{target}}" 105 | data: 106 | hvac_mode: "off" 107 | 108 | - id: turn_off_when_away 109 | alias: "Zet de airco en verwarming uit als we weg zijn" 110 | description: "Climate: Turn off heating when away" 111 | triggers: 112 | - trigger: state 113 | entity_id: zone.home 114 | to: "0" 115 | for: 116 | minutes: 30 117 | actions: 118 | - alias: "Turn off Tado devices that are on (and leave others in current state)" 119 | action: climate.set_hvac_mode 120 | data: 121 | hvac_mode: auto 122 | target: 123 | entity_id: "{{ integration_entities('tado') | select('is_state', 'heat') | list }}" 124 | - alias: "Turn off A/Cs" 125 | action: climate.set_hvac_mode 126 | data: 127 | hvac_mode: "off" 128 | target: 129 | entity_id: 130 | - climate.airco_master_bedroom 131 | - climate.airco_slaapkamer_m 132 | - climate.airco_slaapkamer_t 133 | - climate.airco_woonkamer 134 | 135 | ########################################### 136 | ## Limit high setpoint of kids aircos # 137 | ########################################### 138 | - id: airco_kinderen_niet_te_heet 139 | alias: "Zet airco kinderen automatisch op een normale temperatuur" 140 | description: "Set the kid's AC automatically to a more normal temperature (to prevent user error)" 141 | triggers: 142 | - trigger: numeric_state 143 | entity_id: climate.airco_slaapkamer_t 144 | attribute: temperature 145 | above: 21 146 | variables: 147 | entity: climate.airco_slaapkamer_t 148 | - trigger: numeric_state 149 | entity_id: climate.airco_slaapkamer_m 150 | attribute: temperature 151 | above: 21 152 | variables: 153 | entity: climate.airco_slaapkamer_m 154 | conditions: "{{ states(entity) != 'cool' }}" 155 | actions: 156 | - action: climate.set_temperature 157 | target: 158 | entity_id: "{{entity}}" 159 | data: 160 | temperature: 19.5 161 | -------------------------------------------------------------------------------- /packages/9 - General/batteries.yaml: -------------------------------------------------------------------------------- 1 | batteries_package: 2 | automation: 3 | - id: battery_low_check 4 | alias: Wekelijkse check voor lege batterijen 5 | description: Check whether a battery is low 6 | mode: single 7 | triggers: 8 | - trigger: time 9 | at: "12:00:00" 10 | conditions: 11 | - condition: time 12 | weekday: 13 | - sat 14 | action: 15 | - service: battery_notes.check_battery_low 16 | 17 | - id: battery_low_notification 18 | alias: Bericht over lege batterijen 19 | description: Battery Low Notification with auto dismiss 20 | mode: queued 21 | variables: 22 | title: "{{ trigger.event.data.device_name }}" 23 | message: >- 24 | 🪫 {{ trigger.event.data.device_name }} 25 | {%- if trigger.event.data.battery_level is defined -%} 26 | heeft een batterijniveau van {{trigger.event.data.battery_level}}%. 27 | {%- else -%} 28 | is leeg. 29 | {%- endif %} 30 | Je hebt {{trigger.event.data.battery_quantity }}× 31 | {{trigger.event.data.battery_type }} nodig om de batterij te vervangen. 32 | id: "{{ trigger.event.data.device_id }}" 33 | navigate: "/config/devices/device/{{id}}" 34 | triggers: 35 | - trigger: event 36 | event_type: battery_notes_battery_threshold 37 | event_data: 38 | battery_low: true 39 | id: low 40 | alias: Battery went low 41 | - trigger: event 42 | event_type: battery_notes_battery_threshold 43 | event_data: 44 | battery_low: false 45 | id: high 46 | alias: Battery went high 47 | actions: 48 | - choose: 49 | - conditions: 50 | - condition: trigger 51 | id: low 52 | sequence: 53 | - action: notify.mobile_app_sm_a556b 54 | data: 55 | title: "{{title}}" 56 | message: "{{message}}" 57 | data: 58 | notification_icon: mdi:battery-alert-variant 59 | clickAction: "{{navigate}}" 60 | tag: "{{id}}" 61 | - action: persistent_notification.create 62 | data: 63 | title: "{{title}}" 64 | notification_id: "{{id}}" 65 | message: "{{message}} {{ '\n\n' -}} [Link naar apparaat pagina]({{navigate}})" 66 | - conditions: 67 | - condition: trigger 68 | id: high 69 | sequence: 70 | - action: notify.mobile_app_sm_a556b 71 | data: 72 | message: "clear_notification" 73 | data: 74 | tag: "{{id}}" 75 | - action: persistent_notification.dismiss 76 | data: 77 | notification_id: "{{id}}" 78 | 79 | - id: battery_replaced 80 | alias: Batterijen vervangen 81 | mode: queued 82 | triggers: 83 | - trigger: event 84 | event_type: battery_notes_battery_increased 85 | actions: 86 | - action: battery_notes.set_battery_replaced 87 | data: 88 | device_id: "{{ trigger.event.data.device_id }}" 89 | source_entity_id: "{{ trigger.event.data.source_entity_id }}" 90 | - action: persistent_notification.create 91 | data: 92 | title: | 93 | {{ trigger.event.data.device_name }} Battery Increased 94 | message: > 95 | The device has increased its battery level, I've marked it as replaced 96 | -------------------------------------------------------------------------------- /packages/9 - General/dashboard_helpers.yaml: -------------------------------------------------------------------------------- 1 | dashboard_helpers_package: 2 | template: 3 | - sensor: 4 | - unique_id: airco_woonkamer_icon 5 | state: >- 6 | {% from 'airco_helper.jinja' import airco_icon %} 7 | {{ airco_icon("climate.airco_woonkamer") }} 8 | attributes: 9 | color: >- 10 | {% from 'airco_helper.jinja' import airco_icon %} 11 | {{ airco_icon("climate.airco_woonkamer","color") }} 12 | - unique_id: airco_mbr_icon 13 | state: >- 14 | {% from 'airco_helper.jinja' import airco_icon %} 15 | {{ airco_icon("climate.airco_master_bedroom") }} 16 | attributes: 17 | color: >- 18 | {% from 'airco_helper.jinja' import airco_icon %} 19 | {{ airco_icon("climate.airco_master_bedroom","color") }} 20 | - unique_id: airco_slaapkamer_m_icon 21 | state: >- 22 | {% from 'airco_helper.jinja' import airco_icon %} 23 | {{ airco_icon("climate.airco_slaapkamer_m") }} 24 | attributes: 25 | color: >- 26 | {% from 'airco_helper.jinja' import airco_icon %} 27 | {{ airco_icon("climate.airco_slaapkamer_m","color") }} 28 | - unique_id: airco_slaapkamer_t_icon 29 | state: >- 30 | {% from 'airco_helper.jinja' import airco_icon %} 31 | {{ airco_icon("climate.airco_slaapkamer_t") }} 32 | attributes: 33 | color: >- 34 | {% from 'airco_helper.jinja' import airco_icon %} 35 | {{ airco_icon("climate.airco_slaapkamer_t","color") }} 36 | -------------------------------------------------------------------------------- /packages/9 - General/google_home_volume.yaml: -------------------------------------------------------------------------------- 1 | google_home_volume_package: 2 | automation: 3 | - id: set_google_home_volume 4 | alias: "Stel de Google Home volumes in" 5 | description: "Volume: Set Google Home Volume" 6 | triggers: 7 | - trigger: time 8 | id: "time" 9 | at: 10 | - "07:00:00" 11 | - "09:00:00" 12 | - "19:30:00" 13 | - "20:30:00" 14 | - trigger: homeassistant 15 | event: start 16 | id: "ha_start" 17 | - trigger: event 18 | event_type: automation_reloaded 19 | id: "automation_reload" 20 | actions: 21 | - alias: "Check if this is triggered by HA restart" 22 | if: 23 | condition: trigger 24 | id: "ha_start" 25 | then: 26 | - delay: 27 | minutes: 1 28 | - alias: "Checking what time it is..." 29 | choose: 30 | - alias: "It's between 7hrs and 09:00" 31 | conditions: 32 | - condition: time 33 | after: "06:59:59" 34 | before: "09:00:00" 35 | sequence: 36 | - action: media_player.volume_set 37 | data: 38 | entity_id: 39 | - media_player.kiosk1_fkb 40 | - media_player.nest_hub_woonkamer 41 | volume_level: 0.7 42 | - alias: "It's between 09:00 and 19hrs" 43 | conditions: 44 | - condition: time 45 | after: "08:59:59" 46 | before: "19:00:00" 47 | sequence: 48 | - action: media_player.volume_set 49 | data: 50 | entity_id: 51 | - media_player.slaapkamer_t 52 | - media_player.zolder 53 | volume_level: 0.6 54 | - action: media_player.volume_set 55 | data: 56 | entity_id: media_player.kantoor 57 | volume_level: 0.2 58 | - alias: "It's between 19hrs and 20:30" 59 | conditions: 60 | - condition: time 61 | after: "18:59:59" 62 | before: "20:30:00" 63 | sequence: 64 | - action: media_player.volume_set 65 | data: 66 | entity_id: 67 | - media_player.kiosk1_fkb 68 | - media_player.nest_hub_woonkamer 69 | volume_level: 0.6 70 | - action: media_player.volume_set 71 | data: 72 | entity_id: 73 | - media_player.slaapkamer_t 74 | - media_player.zolder 75 | volume_level: 0.2 76 | - alias: "It's between 20:30 and 7hrs" 77 | conditions: 78 | - condition: time 79 | after: "20:29:59" 80 | before: "07:00:00" 81 | sequence: 82 | - action: media_player.volume_set 83 | data: 84 | entity_id: 85 | - media_player.kiosk1_fkb 86 | - media_player.nest_hub_woonkamer 87 | volume_level: 0.4 88 | - action: media_player.volume_set 89 | data: 90 | entity_id: media_player.kantoor 91 | volume_level: 0.1 92 | -------------------------------------------------------------------------------- /packages/9 - General/kiosk.yaml: -------------------------------------------------------------------------------- 1 | kiosk_package: 2 | input_boolean: 3 | kiosk_hide_header_and_sidebar: 4 | name: "Kiosk mode hide header and sidebar" 5 | 6 | input_select: 7 | kiosk_announcement: 8 | name: "Kiosk announcement playing" 9 | options: 10 | - tafeldekken 11 | - dinner_time 12 | - 5min_warning 13 | - stairs 14 | - geen 15 | - maxi 16 | - mini 17 | 18 | script: 19 | kiosk_restart_browser: 20 | alias: Restart browser 21 | description: "Restart all kiosk browsers" 22 | icon: mdi:web-refresh 23 | mode: single 24 | max_exceeded: silent 25 | sequence: 26 | - action: button.press 27 | target: 28 | entity_id: 29 | - button.kiosk1_herstart_browser 30 | - button.kiosk2_herstart_browser 31 | 32 | kiosk_toggle_airco: 33 | alias: Toggle airco vanaf kiosk 34 | description: "Schakel de airco om vanaf de kiosk" 35 | icon: mdi:hvac 36 | mode: single 37 | max_exceeded: silent 38 | sequence: 39 | - action: climate.set_hvac_mode 40 | data: 41 | hvac_mode: "{{ 'heat' if is_state('climate.airco_woonkamer', 'off') else 'off' }}" 42 | target: 43 | entity_id: climate.airco_woonkamer 44 | 45 | kiosk_announcement: 46 | alias: Omroep vanaf de kiosk 47 | mode: single 48 | max_exceeded: silent 49 | fields: 50 | announcement: 51 | description: "Welk omroepbericht" 52 | example: "tafeldekken" 53 | variables: 54 | message: >- 55 | {% if announcement == 'tafeldekken' %} 56 | {{ states('input_select.tafeldekken_beurt') }}, kom je tafel dekken? 57 | {% elif announcement == 'dinner_time' %} 58 | Het eten is klaar. Komen jullie naar beneden? 59 | {% elif announcement == '5min_warning' %} 60 | Over 5 minuten is het eten klaar. 61 | {% elif announcement == 'stairs' %} 62 | Komen jullie naar beneden? 63 | {% elif announcement == 'maxi' %} 64 | "{{states('input_text.naam_puber')}}, kom je naar beneden?" 65 | {% elif announcement == 'mini' %} 66 | "{{states('input_text.naam_mini')}}, kom je naar beneden?" 67 | {% endif %} 68 | player: >- 69 | {% if announcement == 'tafeldekken' %} 70 | {{'media_player.zolder' if states('input_select.tafeldekken_beurt')[0] == 'M' else 71 | 'media_player.slaapkamer_t' if states('input_select.tafeldekken_beurt')[0] == 'T' else 72 | 'media_player.boven'}} 73 | {% elif announcement in ['dinner_time','5min_warning','stairs'] %} 74 | media_player.boven 75 | {% elif announcement == 'maxi' %} 76 | media_player.zolder 77 | {% elif announcement == 'mini' %} 78 | media_player.slaapkamer_t 79 | {% endif %} 80 | sequence: 81 | - action: input_select.select_option 82 | target: 83 | entity_id: input_select.kiosk_announcement 84 | data: 85 | option: "{{ announcement }}" 86 | - alias: "Play TTS" 87 | action: tts.microsoft_say 88 | data: 89 | entity_id: "{{ player }}" 90 | message: "{{ message }}" 91 | - delay: 92 | seconds: 5 93 | - action: input_select.select_option 94 | target: 95 | entity_id: input_select.kiosk_announcement 96 | data: 97 | option: "geen" 98 | 99 | automation: 100 | - id: kiosk_screensaver 101 | alias: "Schakel de screensaver van de kiosks in of uit" 102 | mode: parallel 103 | triggers: 104 | - trigger: state 105 | entity_id: switch.kiosk1_screensaver 106 | variables: 107 | device: kiosk1 108 | brightness: number.kiosk1_schermhelderheid 109 | - trigger: state 110 | entity_id: switch.kiosk2_screensaver 111 | variables: 112 | device: kiosk2 113 | brightness: number.kiosk2_schermhelderheid 114 | actions: 115 | - choose: 116 | - conditions: "{{ trigger.to_state.state == 'on' }}" 117 | sequence: 118 | - alias: "Schakel de screensaver in" 119 | action: browser_mod.navigate 120 | data: 121 | path: "/tsv-dashboards/screensaver" 122 | browser_id: 123 | - "{{ device }}" 124 | - action: number.set_value 125 | data: 126 | value: 10 127 | target: 128 | entity_id: "{{ brightness }}" 129 | - conditions: "{{ trigger.to_state.state == 'off' }}" 130 | sequence: 131 | - alias: "Schakel de screensaver uit" 132 | action: browser_mod.navigate 133 | data: 134 | path: "/tsv-dashboards/tsv1" 135 | browser_id: 136 | - "{{ device }}" 137 | - action: number.set_value 138 | data: 139 | value: "{{255 if is_state('sun.sun', 'above_horizon') else 125}}" 140 | target: 141 | entity_id: "{{ brightness }}" 142 | 143 | - id: kiosk1_screen 144 | alias: "Schakel het scherm van kiosk 1 in of uit" 145 | trigger: 146 | - alias: "Schakel uit als we de lampen uitzetten" 147 | trigger: state 148 | entity_id: group.lampen_woonkamer 149 | to: "off" 150 | id: "turn_off" 151 | - alias: "Ga sowieso uit om 23:00" 152 | trigger: time 153 | at: "23:00:00" 154 | id: "turn_off" 155 | - alias: "Ga weer aan om 06:30" 156 | trigger: time 157 | at: "06:30:00" 158 | id: "turn_on" 159 | actions: 160 | - alias: "Checking what to do" 161 | choose: 162 | - alias: "Do we need to turn off the screen for the night?" 163 | conditions: 164 | - "{{ trigger.id == 'turn_off' }}" 165 | - condition: time 166 | after: "21:00:00" 167 | sequence: 168 | - action: homeassistant.turn_off 169 | data: 170 | entity_id: 171 | - switch.kiosk1_bewegingsdetectie 172 | - switch.kiosk1_scherm 173 | - alias: "Do we need to turn on the screen?" 174 | conditions: 175 | - "{{ trigger.id == 'turn_on' }}" 176 | sequence: 177 | - action: homeassistant.turn_on 178 | data: 179 | entity_id: 180 | - switch.kiosk1_bewegingsdetectie 181 | - switch.kiosk1_scherm 182 | - action: homeassistant.turn_off 183 | data: 184 | entity_id: 185 | - switch.kiosk1_screensaver 186 | 187 | - id: kiosk2_screen 188 | alias: "Schakel het scherm van kiosk 2 in of uit" 189 | trigger: 190 | - trigger: numeric_state 191 | entity_id: sensor.bureau_kantoor_power 192 | above: 25 193 | id: "turn_on" 194 | - trigger: numeric_state 195 | entity_id: sensor.bureau_kantoor_power 196 | below: 25 197 | for: "00:05:00" 198 | id: "turn_off" 199 | actions: 200 | - alias: "Checking what to do" 201 | choose: 202 | - alias: "Do we need to turn on the screen?" 203 | conditions: 204 | - "{{ trigger.id == 'turn_on' }}" 205 | sequence: 206 | - action: homeassistant.turn_on 207 | data: 208 | entity_id: 209 | - switch.kiosk2_bewegingsdetectie 210 | - switch.kiosk2_scherm 211 | - alias: "Do we need to turn off the screen?" 212 | conditions: 213 | - "{{ trigger.id == 'turn_off' }}" 214 | sequence: 215 | - action: homeassistant.turn_off 216 | data: 217 | entity_id: 218 | - switch.kiosk2_bewegingsdetectie 219 | - switch.kiosk2_scherm 220 | - action: homeassistant.turn_off 221 | data: 222 | entity_id: 223 | - switch.kiosk2_screensaver 224 | 225 | - id: kiosk_restart_at_9 226 | alias: Kiosk herstart browser om 09:00 of bij HA herstart 227 | triggers: 228 | - trigger: time 229 | at: "09:00:00" 230 | - trigger: homeassistant 231 | event: start 232 | actions: 233 | - action: script.kiosk_restart_browser 234 | -------------------------------------------------------------------------------- /packages/9 - General/persons.yaml: -------------------------------------------------------------------------------- 1 | persons_package: 2 | group: 3 | all_adults: 4 | name: Alle volwassenen 5 | icon: mdi:account-group 6 | entities: 7 | - person.bob 8 | - !secret person_mw 9 | 10 | all_persons: 11 | name: Alle Personen 12 | icon: mdi:account-group 13 | entities: 14 | - person.bob 15 | - !secret person_mw 16 | - !secret person_puber 17 | - !secret person_mini 18 | 19 | input_text: 20 | # I am using this workarond to hide sensitive information. 21 | # As templates cannot handle secrets, but you can set these input_text items 22 | # with !secret, so in this way the IDs are obfuscated. I don't mind having these 23 | # in my HA instance, I just don't want them on Github. 24 | naam_puber: 25 | name: Naam puber 26 | initial: !secret naam_puber 27 | naam_mini: 28 | name: Naam mini 29 | initial: !secret naam_mini 30 | 31 | notify: 32 | ## Notify Groups 33 | - platform: group 34 | name: mobile_devices_adults 35 | services: 36 | - service: mobile_app_sm_a556b 37 | - service: mobile_app_sm_a336b 38 | 39 | - platform: group 40 | name: mobile_devices_all 41 | services: 42 | - service: mobile_app_sm_a556b 43 | - service: mobile_app_sm_a336b 44 | - service: mobile_app_schaduwspeler 45 | - service: mobile_app_sm_a236b 46 | 47 | - platform: group 48 | name: mobile_devices_papa_and_mini 49 | services: 50 | - service: mobile_app_sm_a556b 51 | - service: mobile_app_sm_a236b 52 | -------------------------------------------------------------------------------- /packages/9 - General/postcodeloterij.yaml: -------------------------------------------------------------------------------- 1 | postcodeloterij_package: 2 | rest_command: 3 | postcodeloterij: 4 | url: https://www.postcodeloterij.nl/public/rest/drawresults/winnings/NPL/P_{{ 'E' if extra | default(false) | bool(false) else 'M' }}T_P{{ month | default((now().replace(day=1) - timedelta(days=1)).strftime("%Y%m")) }}/?resultSize=10 5 | method: POST 6 | # format for the payload is "query=1234AB" where 1234AB is the postal code 7 | payload: !secret postcodeloterij_postcode 8 | headers: 9 | Content-Type: application/x-www-form-urlencoded 10 | User-Agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" 11 | 12 | template: 13 | - trigger: 14 | # the sensor will be automatically updated on the first 3 days of the month, after 18:00 15 | - trigger: time 16 | at: "18:00" 17 | # you can use the event below in developer tools > events to manually update the sensor 18 | - trigger: event 19 | event_type: update_postcodeloterij_prizes 20 | id: manual 21 | condition: 22 | - condition: template 23 | value_template: "{{ trigger.id == 'manual' or now().day in [1,2,3] }}" 24 | action: 25 | - variables: 26 | month: > 27 | {{ 28 | trigger.event.data.month | int 29 | if 30 | trigger.platform == 'event' 31 | and trigger.event.data is defined 32 | and 'month' in trigger.event.data 33 | else 34 | (now().replace(day=1) - timedelta(days=1)).strftime("%Y%m") | int 35 | }} 36 | month_formatted: > 37 | {% set months = ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'october', 'november', 'december'] %} 38 | {{ months[month % 100 -1] ~ ' ' ~ month // 100 }} 39 | - action: rest_command.postcodeloterij 40 | data: 41 | month: "{{ month }}" 42 | response_variable: prizes 43 | - action: rest_command.postcodeloterij 44 | data: 45 | extra: true 46 | month: > 47 | {% set y = month // 100 %} 48 | {% set m = month % 100 %} 49 | {% set mapping = {6: 13, 12: 14} %} 50 | {{ y * 100 + mapping[m] | default(m) }} 51 | response_variable: prizes_extra 52 | - variables: 53 | # normal monthly draw 54 | prizecount: "{{ prizes.content.prizeCount }}" 55 | prizes: > 56 | {% set ns = namespace(prizes=[]) %} 57 | {% for p in prizes.content.wonPrizes %} 58 | {% set ns.prizes = ns.prizes + [p.description ~ ' (€ ' ~'{:.2f}'.format(p.prizeValue / 100) ~ ')'] %} 59 | {% endfor %} 60 | {{ ns.prizes }} 61 | prize_text: > 62 | {% if prizecount > 0 %} 63 | {% set m = 'prijs' if prizecount == 1 else (prizecount ~ ' prijzen') %} 64 | {{ m }} in de trekking van {{ month_formatted }}: {{ prizes | join(', ') }} 65 | {% endif %} 66 | # extra draw 67 | prizecount_extra: "{{ prizes_extra.content.prizeCount }}" 68 | prizes_extra: > 69 | {% set ns = namespace(prizes=[]) %} 70 | {% for p in prizes_extra.content.wonPrizes %} 71 | {% set ns.prizes = ns.prizes + [p.description ~ ' (€ ' ~'{:.2f}'.format(p.prizeValue / 100) ~ ')'] %} 72 | {% endfor %} 73 | {{ ns.prizes }} 74 | prize_text_extra: > 75 | {% if prizecount_extra > 0 %} 76 | {% set m = 'prijs' if prizecount_extra == 1 else (prizecount_extra ~ ' prijzen') %} 77 | {{ m }} in de extra trekking: {{ prizes_extra | join(', ') }} 78 | {% endif %} 79 | # combined 80 | prizecount_total: "{{ prizecount + prizecount_extra }}" 81 | prize_text_full: > 82 | We hebben {{ [prize_text, prize_text_extra] | select() | join(' en ') }} 83 | # a notification will be sent out if something is won, and it's the first time the sensor was updated this month 84 | # notification parameters are optimized for the Android companion app 85 | - if: > 86 | {{ 87 | prizecount_total | default(0) > 0 88 | and month_formatted != state_attr('sensor.postcodeloterij', 'month') 89 | }} 90 | then: 91 | - alias: "Send notification" 92 | action: notify.mobile_devices_adults 93 | data: 94 | title: "🎁 Winnen doe je bij..." 95 | message: "{{ prize_text_full }}" 96 | data: 97 | channel: LotteryPrize 98 | ttl: 0 99 | priority: high 100 | notification_icon: mdi:gift 101 | tag: LotteryPrize 102 | sensor: 103 | - name: Postcodeloterij 104 | unique_id: 12f71395-3d76-434a-a3d0-9f01a03b834c 105 | icon: "{{ 'mdi:gift' if prizecount > 0 else 'mdi:emoticon-cry' }}" 106 | state: "{{ prizecount + prizecount_extra }}" 107 | attributes: 108 | prizes: "{{ prizes }}" 109 | month: "{{ month_formatted }}" 110 | extra: "{{ month % 100 in [6, 12] }}" 111 | prizes_extra: "{{ prizes_extra }}" 112 | last_updated: "{{ now().strftime('%d-%m-%Y %H:%M') }}" 113 | -------------------------------------------------------------------------------- /packages/9 - General/system.yaml: -------------------------------------------------------------------------------- 1 | system_package: 2 | template: 3 | ############################## 4 | ## Night template sensors # 5 | ############################## 6 | - sensor: 7 | - name: "Nightstate" 8 | unique_id: nightstate 9 | state: "{{ iif(is_state('sun.sun', 'below_horizon'), 1, 0) }}" 10 | 11 | automation: 12 | ########################## 13 | ## Set theme 14 | ########################## 15 | - id: set_theme 16 | alias: "Stel thema in" 17 | triggers: 18 | - trigger: homeassistant 19 | event: start 20 | - trigger: state 21 | entity_id: sun.sun 22 | actions: 23 | - if: "{{ is_state('sun.sun', 'above_horizon')}}" 24 | then: 25 | - action: frontend.set_theme 26 | data: 27 | name: "Hmmbob light theme" 28 | mode: dark 29 | else: 30 | - action: frontend.set_theme 31 | data: 32 | name: "Hmmbob dark theme" 33 | mode: dark 34 | 35 | # Automation to set the date of the "end field" in the UI to the same value as the "start" 36 | - id: ui_set_end_date 37 | alias: "Stel de datum van het eindveld op dezelfde dag in als de begindatum" 38 | description: "System: Fix the UI - set date of end field to date of start field" 39 | triggers: 40 | - trigger: state 41 | entity_id: input_datetime.solar_pv_off_start 42 | variables: 43 | end_entity_id: input_datetime.solar_pv_off_end 44 | actions: 45 | - alias: Set date of desired end field 46 | action: input_datetime.set_datetime 47 | target: 48 | entity_id: "{{ end_entity_id }}" 49 | data: 50 | date: "{{states(trigger.entity_id) | truncate(10, 'False', '') }}" 51 | 52 | ########################## 53 | ## System update notifications 54 | ########################## 55 | - alias: "Stuur een melding dat er een nieuwe Home Assistant versie is" 56 | id: system_update_available_notification 57 | description: Send notification on Home Assistant update available 58 | triggers: 59 | - trigger: state 60 | entity_id: sensor.latest_version 61 | not_to: 62 | - "unknown" 63 | - "unavailable" 64 | - "none" 65 | conditions: 66 | - condition: template 67 | value_template: > 68 | {{ states('sensor.latest_version') != states('sensor.current_version') }} 69 | actions: 70 | - action: notify.mobile_app_sm_a556b 71 | data: 72 | title: Upgrade time! 73 | message: > 74 | There is an upgrade for Home Assistant container pending! 75 | Version {{ states('sensor.latest_version') }} just got released! 76 | data: 77 | tag: System 78 | channel: System 79 | notification_icon: mdi:cellphone-arrow-down 80 | actions: 81 | - action: "URI" 82 | title: "Open Changelog" 83 | uri: "https://github.com/home-assistant/core/releases/tag/{{states('sensor.latest_version')}}" 84 | 85 | script: 86 | light_group_toggle_helper: 87 | alias: Light group toggle helper 88 | description: "System: Turn all lights in a group on or off based on status of the group" 89 | icon: mdi:lightbulb-group 90 | mode: single 91 | max_exceeded: silent 92 | fields: 93 | group: 94 | description: "The light group to turn on or off" 95 | example: "group.lampen_eetkamer" 96 | required: true 97 | sequence: 98 | - condition: "{{ true if group is defined and group != none else false }}" 99 | - if: 100 | - "{{ is_state(group, 'on') }}" 101 | then: 102 | - action: homeassistant.turn_off 103 | target: 104 | entity_id: "{{ group }}" 105 | else: 106 | - action: homeassistant.turn_on 107 | target: 108 | entity_id: "{{ group }}" 109 | 110 | multiple_tap_actions: 111 | alias: Multi Tap Action 112 | mode: parallel 113 | sequence: 114 | - repeat: 115 | for_each: "{{actions}}" 116 | sequence: 117 | - if: 118 | - condition: template 119 | value_template: "{{repeat.item.wait is defined}}" 120 | then: 121 | - delay: 122 | hours: 0 123 | minutes: 0 124 | seconds: "{{repeat.item.wait | float}}" 125 | - if: 126 | - condition: template 127 | value_template: "{{repeat.item.entity_id is not defined and repeat.item.data is not defined and repeat.item.wait is not defined }}" 128 | then: 129 | action: "{{ repeat.item.action }}" 130 | - if: 131 | - condition: template 132 | value_template: "{{repeat.item.entity_id is defined and repeat.item.data is not defined }}" 133 | then: 134 | action: "{{ repeat.item.action }}" 135 | target: 136 | entity_id: "{{repeat.item.entity_id}}" 137 | - if: 138 | - condition: template 139 | value_template: "{{repeat.item.entity_id is not defined and repeat.item.data is defined }}" 140 | then: 141 | action: "{{ repeat.item.action }}" 142 | data: "{{ repeat.item.data }}" 143 | - if: 144 | - condition: template 145 | value_template: "{{repeat.item.entity_id is defined and repeat.item.data is defined }}" 146 | then: 147 | action: "{{ repeat.item.action }}" 148 | target: 149 | entity_id: "{{repeat.item.entity_id}}" 150 | data: "{{ repeat.item.data }}" 151 | -------------------------------------------------------------------------------- /packages/9 - General/tts_system.yaml: -------------------------------------------------------------------------------- 1 | tts_system_package: 2 | ########################## 3 | ## Send a TTS message on selected speakers 4 | ########################## 5 | input_text: 6 | tts_message: 7 | name: Bericht 8 | icon: mdi:message-processing-outline 9 | max: 255 10 | 11 | input_select: 12 | tts_target: 13 | name: TTS Target 14 | options: 15 | - Woonkamer 16 | - Hele huis 17 | - Bovenverdieping 18 | - Slaapkamer T 19 | - Zolder 20 | - Kantoor 21 | icon: mdi:cast-audio 22 | 23 | script: 24 | play_tts_message: 25 | alias: Play TTS message 26 | description: "Play a TTS message set in the frontend" 27 | icon: mdi:account-voice 28 | mode: single 29 | max_exceeded: silent 30 | variables: 31 | target: > 32 | {% if is_state("input_select.tts_target", "Woonkamer") %} media_player.nest_hub_woonkamer 33 | {% elif is_state("input_select.tts_target", "Hele huis") %} media_player.hele_huis 34 | {% elif is_state("input_select.tts_target", "Bovenverdieping") %} media_player.boven 35 | {% elif is_state("input_select.tts_target", "Slaapkamer T") %} media_player.slaapkamer_t 36 | {% elif is_state("input_select.tts_target", "Zolder") %} media_player.zolder 37 | {% elif is_state("input_select.tts_target", "Kantoor") %} media_player.kantoor 38 | {% endif %} 39 | sequence: 40 | - action: tts.microsoft_say 41 | data: 42 | entity_id: "{{ target }}" 43 | message: "{{ states('input_text.tts_message') }}" 44 | cache: false 45 | - delay: 00:00:10 46 | - action: media_player.turn_off 47 | data: 48 | entity_id: "{{ target }}" 49 | -------------------------------------------------------------------------------- /packages/9 - General/ups.yaml: -------------------------------------------------------------------------------- 1 | ups_package: 2 | automation: 3 | - id: ups_notification 4 | alias: "Verstuur een melding als we op de UPS draaien" 5 | mode: single 6 | max_exceeded: silent 7 | triggers: 8 | - trigger: state 9 | entity_id: 10 | - sensor.ups_battery_charge 11 | - sensor.ups_status_data 12 | variables: 13 | runtime_left: > 14 | {% set runtime = states("sensor.ups_battery_runtime") | int %} 15 | {% set hours = runtime // 3600 %} 16 | {% set minutes = (runtime % 3600) // 60 %} 17 | {{ '%du' % hours if hours else '' }}{{ '%dm' % minutes if minutes else '' }} 18 | conditions: 19 | - alias: "Previous state of triggers is not unavailable or unkown" 20 | condition: template 21 | value_template: "{{ trigger.from_state.state not in ['unavailable', 'unknown'] }}" 22 | actions: 23 | - alias: "Choose our status" 24 | choose: 25 | - conditions: 26 | - alias: "If we are On Battery DISCHaRGing" 27 | condition: state 28 | entity_id: sensor.ups_status_data 29 | state: "OB DISCHRG" 30 | sequence: 31 | - alias: "We're running on battery!" 32 | action: notify.mobile_app_sm_a556b 33 | data: 34 | title: 🪫 UPS ingeschakeld! 35 | message: > 36 | De servers draaien op UPS. Er is nog {{ runtime_left }} runtime over. 37 | data: 38 | tag: "UPS" 39 | alert_once: true 40 | sticky: true 41 | persistent: true 42 | ttl: 0 43 | priority: high 44 | notification_icon: mdi:home-battery-outline 45 | car_ui: true 46 | - conditions: 47 | - alias: "If we are On Line CHaRGing" 48 | condition: state 49 | entity_id: sensor.ups_status_data 50 | state: "OL CHRG" 51 | sequence: 52 | - alias: "We're back online, charging the UPS battery!" 53 | action: notify.mobile_app_sm_a556b 54 | data: 55 | title: 🔋 UPS weer online & aan het opladen! 56 | message: > 57 | Er is weer stroom. De UPS laadt weer op en is {{ states("sensor.ups_battery_charge") }}% vol. 58 | data: 59 | tag: "UPS" 60 | alert_once: true 61 | sticky: true 62 | persistent: true 63 | ttl: 0 64 | priority: high 65 | notification_icon: mdi:power-plug-battery-outline 66 | car_ui: true 67 | - conditions: 68 | - alias: "If we are back OnLine" 69 | condition: state 70 | entity_id: sensor.ups_status_data 71 | state: "OL" 72 | sequence: 73 | - action: notify.mobile_app_sm_a556b 74 | data: 75 | message: "clear_notification" 76 | data: 77 | tag: "UPS" 78 | -------------------------------------------------------------------------------- /packages/9 - General/vacation_mode.yaml: -------------------------------------------------------------------------------- 1 | vacation_mode_package: 2 | input_boolean: 3 | vacation_mode_away: 4 | name: "Vakantie (weg)" 5 | icon: mdi:home-lock 6 | 7 | input_datetime: 8 | time_vacation_lights_start: 9 | name: Vacation lights start 10 | has_time: true 11 | time_vacation_lights_end: 12 | name: Vacation lights end 13 | has_time: true 14 | 15 | automation: 16 | ############################# 17 | ## Vacation lights # 18 | ############################# 19 | - id: vacation_turn_on_time 20 | alias: "Zet de verlichting aan tijdens vakantie" 21 | initial_state: on 22 | triggers: 23 | trigger: time 24 | at: input_datetime.time_vacation_lights_start 25 | conditions: 26 | - condition: state 27 | entity_id: input_boolean.vacation_mode_away 28 | state: "on" 29 | actions: 30 | - delay: "{{ range(30*60) | random }}" 31 | alias: "Random delay between now and 30mins" 32 | - action: homeassistant.turn_on 33 | entity_id: 34 | - light.spots_woonkamer 35 | - light.spots_eetkamer 36 | - action: logbook.log 37 | data: 38 | name: Vacation 39 | message: Lights turned on at {{ now().strftime('%H:%M') }}. 40 | domain: light 41 | - action: notify.mobile_app_sm_a556b 42 | data: 43 | message: I turned your vacation lights on at {{ now().strftime('%H:%M') }}. 44 | title: Vacation lights 45 | data: 46 | ttl: 0 47 | priority: high 48 | 49 | - id: vacation_turn_off_time 50 | alias: "Zet de verlichting uit tijdens vakantie" 51 | triggers: 52 | trigger: time 53 | at: input_datetime.time_vacation_lights_end 54 | conditions: 55 | - condition: state 56 | entity_id: input_boolean.vacation_mode_away 57 | state: "on" 58 | actions: 59 | - delay: "{{ range(15*60) | random }}" 60 | alias: "Random delay between now and 30mins" 61 | - action: homeassistant.turn_off 62 | entity_id: 63 | - light.spots_woonkamer 64 | - light.spots_eetkamer 65 | - action: logbook.log 66 | data: 67 | name: Vacation 68 | message: Lights turned off at {{ now().strftime('%H:%M') }}. 69 | domain: light 70 | - action: notify.mobile_app_sm_a556b 71 | data: 72 | message: I turned your lights off at {{ now().strftime('%H:%M') }}. 73 | title: Vacation lights 74 | data: 75 | ttl: 0 76 | priority: high 77 | 78 | ############################# 79 | ## Vacation alarm # 80 | ############################# 81 | - id: vacation_movement_inside 82 | alias: "Beweging gedetecteerd tijdens vakantie" 83 | trigger: 84 | - platform: state 85 | entity_id: 86 | - binary_sensor.fietsenhok_contact 87 | - binary_sensor.pir_bijkeuken_occupancy 88 | - binary_sensor.pir_gang_kapstok_motion_detection 89 | - binary_sensor.pir_gang_meterkast_motion_detection 90 | - binary_sensor.pir_inloopkast_occupancy 91 | - binary_sensor.poort_contact 92 | from: "off" 93 | to: "on" 94 | condition: 95 | - condition: state 96 | entity_id: input_boolean.vacation_mode_away 97 | state: "on" 98 | action: 99 | - service: notify.mobile_app_sm_a556b 100 | data: 101 | message: >- 102 | Er is beweging gedetecteerd door {{ trigger.from_state.attributes.friendly_name }} ({{ now().strftime('%H:%M') }}) 103 | title: Movement in the house 104 | data: 105 | ttl: 0 106 | priority: high 107 | notification_icon: "mdi:shield-home" 108 | - service: logbook.log 109 | data: 110 | name: Vacation 111 | message: Er is beweging gedetecteerd door {{ trigger.from_state.attributes.friendly_name }}. 112 | domain: binary_sensor 113 | -------------------------------------------------------------------------------- /packages/9 - General/ventilation.yaml: -------------------------------------------------------------------------------- 1 | ventilation_package: 2 | timer: 3 | fan_runtime: 4 | restore: true 5 | 6 | automation: 7 | - id: ventilation_handle_button 8 | alias: "Start de ventilatie timer als we op een knop drukken" 9 | triggers: 10 | - trigger: state 11 | entity_id: 12 | - event.drukknop_badkamer_action 13 | - event.drukknop_badkamer_zolder_action 14 | - event.drukknop_bijkeuken_action 15 | to: ~ 16 | variables: 17 | event: "{{ trigger.to_state.attributes.event_type | default('unknown', true) }}" 18 | conditions: 19 | - "{{ event not in ['unknown','unavailable'] }}" 20 | actions: 21 | - action: timer.start 22 | target: 23 | entity_id: timer.fan_runtime 24 | data: 25 | duration: "{{'01:00:00' if event in ['brightness_move_up','1_long_press'] else '00:30:00'}}" 26 | 27 | - id: ventilation_boost_speed 28 | alias: "Stel een hogere ventilatiesnelheid in als de timer start" 29 | triggers: 30 | - trigger: event 31 | event_type: timer.started 32 | event_data: 33 | entity_id: timer.fan_runtime 34 | actions: 35 | - alias: Boost ventilation on request 36 | action: fan.set_percentage 37 | target: 38 | entity_id: fan.open_air_mini 39 | data: 40 | percentage: 80 41 | 42 | - id: ventilation_set_speed 43 | alias: "Stel de ventilatiesnelheid in" 44 | mode: queued 45 | triggers: 46 | - trigger: time 47 | id: "time" 48 | at: 49 | - "07:00:00" 50 | - "09:00:00" 51 | - "21:15:00" 52 | - trigger: homeassistant 53 | event: start 54 | id: "ha_start" 55 | - trigger: event 56 | event_type: automation_reloaded 57 | id: "automation_reload" 58 | - trigger: event 59 | event_type: timer.finished 60 | event_data: 61 | entity_id: timer.fan_runtime 62 | actions: 63 | - alias: "Check if this is triggered by HA restart" 64 | if: 65 | condition: trigger 66 | id: "ha_start" 67 | then: 68 | - delay: 69 | minutes: 1 70 | - alias: "Cancel any running timers" 71 | action: timer.cancel 72 | target: 73 | entity_id: timer.fan_runtime 74 | - alias: "Checking what time it is..." 75 | choose: 76 | - alias: "It's between 7hrs and 09:00 and on a working day" 77 | conditions: 78 | - condition: time 79 | after: "06:59:59" 80 | before: "09:00:00" 81 | - condition: state 82 | entity_id: binary_sensor.werkdag 83 | state: "on" 84 | sequence: 85 | - alias: Boost during morning hours because of showering 86 | action: fan.set_percentage 87 | target: 88 | entity_id: fan.open_air_mini 89 | data: 90 | percentage: 70 91 | - alias: "It's between 09hrs and 21hrs" 92 | conditions: 93 | - condition: time 94 | after: "08:59:59" 95 | before: "21:00:00" 96 | sequence: 97 | - alias: Run at half speed during the day 98 | action: fan.set_percentage 99 | target: 100 | entity_id: fan.open_air_mini 101 | data: 102 | percentage: 50 103 | - alias: "It's between 21hrs and 7hrs" 104 | conditions: 105 | - condition: time 106 | after: "20:59:59" 107 | before: "07:00:00" 108 | sequence: 109 | - alias: Sleep tight 110 | action: fan.set_percentage 111 | target: 112 | entity_id: fan.open_air_mini 113 | data: 114 | percentage: 20 115 | -------------------------------------------------------------------------------- /packages/9 - General/whose_turn_is_it.yaml: -------------------------------------------------------------------------------- 1 | whose_turn_is_it_package: 2 | input_select: 3 | tafeldekken_beurt: 4 | name: Tafeldekken beurt 5 | options: 6 | - !secret naam_puber 7 | - !secret naam_mini 8 | 9 | automation: 10 | - id: rotate_turns 11 | alias: "Wissel de beurt voor het tafeldekken" 12 | triggers: 13 | - trigger: time 14 | at: 15 | - "00:01:00" 16 | conditions: 17 | - condition: time 18 | weekday: 19 | - mon 20 | actions: 21 | - action: input_select.select_next 22 | target: 23 | entity_id: input_select.tafeldekken_beurt 24 | 25 | script: 26 | whose_turn_is_it: 27 | alias: Tafeldekken 28 | description: "Wie moet er tafeldekken?" 29 | mode: restart 30 | sequence: 31 | - alias: "Play TTS" 32 | action: tts.microsoft_say 33 | entity_id: media_player.kiosk1_fkb 34 | data: 35 | message: "Vandaag moet {{ states('input_select.tafeldekken_beurt') }} tafel dekken." 36 | -------------------------------------------------------------------------------- /scripts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # This file is used by the script editor 3 | # in the Home Assistant frontend. This file must exist 4 | # for the frontend script editor to work. 5 | # 6 | # If you are looking for my scripts: they are part of packages 7 | # in the packages folder. 8 | {} 9 | -------------------------------------------------------------------------------- /themes/hmmbob_theme/hmmbob_theme.yaml: -------------------------------------------------------------------------------- 1 | Hmmbob light theme: 2 | # Card mod stuff 3 | card-mod-theme: Hmmbob light theme 4 | header-height: 48px 5 | card-mod-root-yaml: | 6 | .: | 7 | ha-tabs { 8 | height: var(--header-height); 9 | --paper-tabs-selection-bar-color: var(--primary-color) !important; 10 | color: var(--app-header-text-color) !important; 11 | } 12 | paper-tab[aria-selected=true] > ha-icon, paper-tab[aria-selected=true] { 13 | color: var(--primary-color) !important; 14 | } 15 | /* This hides the help button, menu button and title */ 16 | .action-items { 17 | display: none !important; 18 | } 19 | .header { 20 | top: calc(100vh - 48px) !important; 21 | bottom: 0 !important; 22 | transform: unset !important; 23 | } 24 | #view { 25 | padding-top: 0px !important; 26 | padding-bottom: 48px !important; 27 | } 28 | card-mod-card: | 29 | @keyframes boing { 30 | 0% { transform: scale3d(1, 1, 1); } 31 | 7% { transform: scale3d(1.25, 0.75, 1); } 32 | 10% { transform: scale3d(0.75, 1.25, 1); } 33 | 12% { transform: scale3d(1.15, 0.85, 1); } 34 | 16% { transform: scale3d(0.95, 1.05, 1); } 35 | 19% { transform: scale3d(1.05, 0.95, 1); } 36 | 25% { transform: scale3d(1, 1, 1); } 37 | } 38 | 39 | @keyframes illumination { 40 | 0%, 100% { clip-path: inset(0 0 0 0); } 41 | 80% { clip-path: polygon(0% 99%, 20% 55%, 22% 37%, 39% 20%, 61% 21%, 77% 35%, 79% 57%, 99% 100%); } 42 | } 43 | 44 | # Remove outline in popup content on mobile 45 | card-mod-more-info-yaml: | 46 | .: | 47 | .container, .content { 48 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 49 | -webkit-focus-ring-color: rgba(0, 0, 0, 0); 50 | outline: none !important; 51 | } 52 | 53 | # Main Interface Colors 54 | primary-color: rgb(26, 115, 232) 55 | light-primary-color: var(--primary-color) 56 | primary-background-color: rgb(248, 248, 248) 57 | secondary-background-color: rgb(230, 230, 230) 58 | divider-color: var(--primary-background-color) 59 | accent-color: rgb(26, 115, 232) 60 | 61 | # Header: 62 | app-header-background-color: rgb(248, 248, 248) 63 | app-header-text-color: rgb(95, 99, 104) 64 | 65 | # Sidebar Menu 66 | sidebar-icon-color: rgb(95, 99, 104) 67 | sidebar-text-color: var(--sidebar-icon-color) 68 | sidebar-background-color: rgb(255, 255, 255) 69 | sidebar-selected-background-color: var(--primary-background-color) 70 | sidebar-selected-icon-color: rgb(26, 115, 232) 71 | sidebar-selected-text-color: var(--sidebar-selected-icon-color) 72 | 73 | # Cards 74 | card-background-color: rgb(255, 255, 255) 75 | ha-card-border-radius: "10px" 76 | ha-card-box-shadow: 1px 1px 5px 0px rgb(230, 230, 230) 77 | paper-dialog-background-color: var(--card-background-color) 78 | paper-listbox-background-color: var(--card-background-color) 79 | paper-card-background-color: var(--card-background-color) 80 | 81 | # Buttons 82 | paper-item-icon-color: rgb(95, 99, 104) 83 | paper-item-icon-active-color: rgb(26, 115, 232) 84 | 85 | # Checkboxes 86 | mdc-select-fill-color: rgb(255, 255, 255) 87 | mdc-select-ink-color: var(--primary-text-color) 88 | mdc-select-label-ink-color: var(--secondary-text-color) 89 | mdc-select-idle-line-color: var(--primary-text-color) 90 | mdc-select-dropdown-icon-color: var(--secondary-text-color) 91 | mdc-select-hover-line-color: var(--accent-color) 92 | 93 | Hmmbob dark theme: 94 | # Card mod stuff 95 | card-mod-theme: Hmmbob dark theme 96 | header-height: 48px 97 | card-mod-root-yaml: | 98 | .: | 99 | ha-tabs { 100 | height: var(--header-height); 101 | --paper-tabs-selection-bar-color: var(--primary-color) !important; 102 | color: var(--app-header-text-color) !important; 103 | } 104 | paper-tab[aria-selected=true] > ha-icon, paper-tab[aria-selected=true] { 105 | color: var(--primary-color) !important; 106 | } 107 | /* This hides the help button, menu button and title */ 108 | .action-items { 109 | display: none !important; 110 | } 111 | .header { 112 | top: calc(100vh - 48px) !important; 113 | bottom: 0 !important; 114 | transform: unset !important; 115 | } 116 | #view { 117 | padding-top: 0px !important; 118 | padding-bottom: 48px !important; 119 | } 120 | card-mod-card: | 121 | @keyframes boing { 122 | 0% { transform: scale3d(1, 1, 1); } 123 | 7% { transform: scale3d(1.25, 0.75, 1); } 124 | 10% { transform: scale3d(0.75, 1.25, 1); } 125 | 12% { transform: scale3d(1.15, 0.85, 1); } 126 | 16% { transform: scale3d(0.95, 1.05, 1); } 127 | 19% { transform: scale3d(1.05, 0.95, 1); } 128 | 25% { transform: scale3d(1, 1, 1); } 129 | } 130 | 131 | @keyframes illumination { 132 | 0%, 100% { clip-path: inset(0 0 0 0); } 133 | 80% { clip-path: polygon(0% 99%, 20% 55%, 22% 37%, 39% 20%, 61% 21%, 77% 35%, 79% 57%, 99% 100%); } 134 | } 135 | 136 | # Remove outline in popup content on mobile 137 | card-mod-more-info-yaml: | 138 | .: | 139 | .container, .content { 140 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 141 | -webkit-focus-ring-color: rgba(0, 0, 0, 0); 142 | outline: none !important; 143 | } 144 | 145 | modes: 146 | dark: 147 | # Main Interface Colors 148 | primary-color: rgb(138, 180, 248) 149 | light-primary-color: var(--primary-color) 150 | primary-background-color: rgb(23, 23, 23) 151 | secondary-background-color: rgb(32, 33, 36) 152 | divider-color: var(--primary-background-color) 153 | accent-color: rgb(138, 180, 248) 154 | 155 | # Header: 156 | app-header-background-color: rgb(23, 23, 23) 157 | app-header-text-color: rgb(198, 203, 210) 158 | 159 | # Sidebar Menu 160 | sidebar-icon-color: rgb(169, 177, 188) 161 | sidebar-text-color: rgb(198, 203, 210) 162 | sidebar-background-color: rgb(32, 33, 36) 163 | sidebar-selected-background-color: var(--primary-background-color) 164 | sidebar-selected-icon-color: rgb(138, 180, 248) 165 | sidebar-selected-text-color: var(--sidebar-selected-icon-color) 166 | 167 | # Cards 168 | card-background-color: rgb(32, 33, 36) 169 | ha-card-border-radius: "10px" 170 | ha-card-box-shadow: 1px 1px 5px 0px rgb(12, 12, 14) 171 | paper-dialog-background-color: var(--card-background-color) 172 | paper-listbox-background-color: var(--card-background-color) 173 | paper-card-background-color: var(--card-background-color) 174 | 175 | # Buttons 176 | paper-item-icon-color: rgb(169, 177, 188) 177 | paper-item-icon-active-color: rgb(138, 180, 248) 178 | 179 | # Checkboxes 180 | mdc-select-fill-color: rgb(32, 33, 36) 181 | mdc-select-ink-color: var(--primary-text-color) 182 | mdc-select-label-ink-color: var(--secondary-text-color) 183 | mdc-select-idle-line-color: var(--primary-text-color) 184 | mdc-select-dropdown-icon-color: var(--secondary-text-color) 185 | mdc-select-hover-line-color: var(--accent-color) 186 | -------------------------------------------------------------------------------- /ui-lovelace.yaml: -------------------------------------------------------------------------------- 1 | swipe_nav: 2 | animate: swipe 3 | 4 | title: Home sweet home 5 | views: 6 | - !include dashboards/0-main.yaml 7 | - !include dashboards/1-living_room.yaml 8 | - !include dashboards/2-dining_room.yaml 9 | - !include dashboards/3-salon.yaml 10 | - !include dashboards/4-office.yaml 11 | - !include dashboards/5-mbr.yaml 12 | - !include dashboards/6-bed_room_maxi.yaml 13 | - !include dashboards/7-bed_room_mini.yaml 14 | - !include dashboards/8-other.yaml 15 | - !include dashboards/13-camera.yaml 16 | - !include dashboards/14-energy.yaml 17 | - !include dashboards/15-car.yaml 18 | - !include dashboards/16-plants.yaml 19 | -------------------------------------------------------------------------------- /www/icons/gft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/www/icons/gft.png -------------------------------------------------------------------------------- /www/icons/oudpapier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/www/icons/oudpapier.png -------------------------------------------------------------------------------- /www/icons/picnic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/www/icons/picnic_background.png -------------------------------------------------------------------------------- /www/icons/picnic_background2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/www/icons/picnic_background2.png -------------------------------------------------------------------------------- /www/icons/plastic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/www/icons/plastic.png -------------------------------------------------------------------------------- /www/icons/plasticpapier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/www/icons/plasticpapier.png -------------------------------------------------------------------------------- /www/icons/restafval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/www/icons/restafval.png -------------------------------------------------------------------------------- /www/icons/wasmachine-green.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/www/icons/wasmachine-green.jpg -------------------------------------------------------------------------------- /www/icons/wasmachine-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hmmbob/HomeAssistantConfig/f46e2fd4eafec03a8d2548165a8c2c65c74262f0/www/icons/wasmachine-green.png --------------------------------------------------------------------------------