├── customize.yaml
├── python_scripts
├── do_nothing.py
├── broadlink_send.py
├── telegram_send_photo_callback.py
├── telegram_callback.py
├── ceiling_light_set_level.py
└── ac_damper.py
├── packages
├── Automations
│ ├── doorbell.yaml
│ ├── intercom.yaml
│ ├── go_to_sleep.yaml
│ ├── internet_sensor.yaml
│ ├── closet_motion.yaml
│ ├── timers.yaml
│ ├── smoke_sensors.yaml
│ ├── water_leak_sensors.yaml
│ ├── coming_home.yaml
│ ├── riley_is_sleeping.yaml
│ ├── bathroom.yaml
│ ├── rain_sensor.yaml
│ ├── stairs.yaml
│ ├── power_consumption_partial_period.yaml
│ └── toilet.yaml
├── Services
│ ├── reversotts.yaml
│ ├── zone.yaml
│ ├── default_theme.yaml
│ ├── notify.yaml
│ ├── spotify.yaml
│ ├── say_something.yaml
│ ├── zigbee2mqtt.yaml
│ ├── weather.yaml
│ ├── blink_light.yaml
│ └── water_consumption.yaml
├── Devices
│ ├── shelly_3em.yaml
│ ├── appliances.yaml
│ ├── cameras.yaml
│ ├── balcony_power.yaml
│ ├── parking_gates.yaml
│ ├── hue_remote_riley.yaml
│ ├── windows_group.yaml
│ ├── hue_remote_office.yaml
│ ├── hue_remote_bedroom_inbal.yaml
│ └── laundry_machine.yaml
├── Climate
│ ├── heater_groups.yaml
│ ├── fan_groups.yaml
│ ├── white_fans.yaml
│ └── office_fan.yaml
└── Lights
│ ├── change_switches_to_lights.yaml
│ └── yule.yaml
├── lovelace
├── views
│ ├── 10_dev.yaml
│ ├── rooms.yaml
│ ├── 22_riley_camera.yaml
│ ├── 11_hallway.yaml
│ ├── 15_toilet.yaml
│ ├── 21_front_door_camera.yaml
│ ├── 16_bathroom.yaml
│ ├── 19_riley.yaml
│ ├── 13_balcony.yaml
│ ├── 20_bedroom.yaml
│ ├── 12_living_room.yaml
│ ├── 17_office.yaml
│ ├── 18_guests.yaml
│ ├── schedule.yaml
│ ├── 03_ac.yaml
│ ├── smart_home_config.yaml
│ ├── 05_googlespeakers.yaml
│ └── 06_sensors.yaml
├── cards
│ ├── greeting.yaml
│ ├── quick_status_entrance.yaml
│ ├── control_scenes_title.yaml
│ ├── control_shower_container.yaml
│ ├── control_fans_container.yaml
│ ├── control_rooms_container.yaml
│ ├── control_ac_container.yaml
│ ├── control_scenes_container.yaml
│ ├── control_screens_container.yaml
│ ├── greeting_title.yaml
│ ├── weather_title.yaml
│ ├── quick_status_title.yaml
│ ├── quick_status_entrance_title.yaml
│ ├── ups.yaml
│ ├── quick_status_entrance_container.yaml
│ ├── control_windows_container.yaml
│ ├── control_shower_title.yaml
│ ├── weather.yaml
│ ├── control_fans_title.yaml
│ ├── quick_status_internet.yaml
│ ├── control_ac_title.yaml
│ ├── control_windows_other.yaml
│ ├── control_lights_title_1row.yaml
│ ├── control_lights_title_2rows.yaml
│ ├── quick_status_laundry_machine.yaml
│ ├── control_scenes.yaml
│ ├── quick_status_entities.yaml
│ ├── control_screens.yaml
│ ├── control_ac_simple.yaml
│ ├── devices.yaml
│ ├── quick_status_appliances.yaml
│ ├── quick_status_cameras.yaml
│ ├── windows.yaml
│ └── guest_mode.yaml
├── room_cards
│ ├── bedroom
│ │ ├── camera.yaml
│ │ ├── wake_up.yaml
│ │ ├── window.yaml
│ │ └── lights.yaml
│ ├── guests
│ │ ├── camera.yaml
│ │ ├── sensors.yaml
│ │ ├── lights.yaml
│ │ ├── window.yaml
│ │ └── devices.yaml
│ ├── office
│ │ ├── camera.yaml
│ │ ├── sensors.yaml
│ │ ├── window.yaml
│ │ ├── devices.yaml
│ │ └── lights.yaml
│ ├── balcony
│ │ ├── camera.yaml
│ │ ├── devices.yaml
│ │ └── lights.yaml
│ ├── riley
│ │ ├── camera.yaml
│ │ ├── window.yaml
│ │ ├── sensors.yaml
│ │ └── lights.yaml
│ ├── hallway
│ │ └── lights.yaml
│ ├── living_room
│ │ ├── camera.yaml
│ │ ├── devices.yaml
│ │ └── window.yaml
│ ├── bathroom
│ │ ├── sensors.yaml
│ │ └── lights.yaml
│ ├── toilet
│ │ ├── lights.yaml
│ │ └── sensors.yaml
│ └── kitchen
│ │ └── lights.yaml
└── decluttering_templates
│ ├── room_camera.yaml
│ ├── tv_remote.yaml
│ ├── say_something.yaml
│ └── tablet_control.yaml
├── examples
├── lights.png
├── power.png
├── rooms.png
├── shower.png
├── windows.png
├── guest_mode.png
├── air_conditioning.png
├── mobile_homescreen.png
└── tablet_homescreen.png
├── ui_lovelace_minimalist
└── custom_cards
│ ├── fill_container
│ └── fill_container.yaml
│ ├── ha_button_small_label
│ └── ha_button_small_label.yaml
│ ├── config_button
│ └── config_button.yaml
│ ├── custom_card_vertical_button
│ └── custom_card_vertical_button.yaml
│ ├── fridge
│ └── fridge.yaml
│ ├── camera_view
│ └── camera_view.yaml
│ ├── internet
│ └── internet.yaml
│ ├── title
│ └── title.yaml
│ ├── room_card
│ └── room_card.yaml
│ ├── small_card
│ └── small_card.yaml
│ ├── card_room_cover_up
│ └── card_room_cover_up.yaml
│ ├── card_room_cover_down
│ └── card_room_cover_down.yaml
│ ├── window_room_button
│ └── window_room_button.yaml
│ ├── yellow_fan_only
│ └── yellow_fan_only.yaml
│ ├── riley_sleeping_room_button
│ └── riley_sleeping_room_button.yaml
│ ├── tv_button
│ └── tv_button.yaml
│ ├── camera_status
│ └── camera_status.yaml
│ ├── timer_button
│ └── timer_button.yaml
│ ├── gallery_day
│ └── gallery_day.yaml
│ ├── back_button
│ └── back_button.yaml
│ ├── room_card_temperature_monitor
│ └── room_card_temperature_monitor.yaml
│ ├── container
│ └── container.yaml
│ ├── device_tracker_colors
│ └── device_tracker_colors.yaml
│ ├── ha_button_mushroom
│ └── mushroom_button.yaml
│ ├── notification
│ └── notification.yaml
│ ├── card_room_5_entities
│ └── card_room_5_entities.yaml
│ ├── ha_button
│ └── ha_button.yaml
│ ├── card_room_cover_stop
│ └── card_room_cover_stop.yaml
│ ├── tablet_button
│ └── tablet_button.yaml
│ ├── card_room_6_entities
│ └── card_room_6_entities.yaml
│ ├── card_room_windows
│ └── card_room_windows.yaml
│ ├── cover_buttons
│ └── cover_buttons.yaml
│ └── climate_room_button
│ └── climate_room_button.yaml
├── .gitignore
├── lovelace_advanced.yaml
├── lovelace_portrait.yaml
├── lovelace_landscape.yaml
└── README.md
/customize.yaml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python_scripts/do_nothing.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/Automations/doorbell.yaml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/Services/reversotts.yaml:
--------------------------------------------------------------------------------
1 | tts:
2 | - platform: reversotts
--------------------------------------------------------------------------------
/lovelace/views/10_dev.yaml:
--------------------------------------------------------------------------------
1 | title: dev
2 | path: dev
3 | panel: false
4 |
5 | cards:
--------------------------------------------------------------------------------
/packages/Devices/shelly_3em.yaml:
--------------------------------------------------------------------------------
1 | # Moved to packages/automation/power_consumption.yaml
--------------------------------------------------------------------------------
/lovelace/cards/greeting.yaml:
--------------------------------------------------------------------------------
1 | type: markdown
2 | content: '{{ states(''sensor.greeting_body'') }}'
--------------------------------------------------------------------------------
/examples/lights.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shlomki/HomeAssistant-Config/HEAD/examples/lights.png
--------------------------------------------------------------------------------
/examples/power.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shlomki/HomeAssistant-Config/HEAD/examples/power.png
--------------------------------------------------------------------------------
/examples/rooms.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shlomki/HomeAssistant-Config/HEAD/examples/rooms.png
--------------------------------------------------------------------------------
/examples/shower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shlomki/HomeAssistant-Config/HEAD/examples/shower.png
--------------------------------------------------------------------------------
/examples/windows.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shlomki/HomeAssistant-Config/HEAD/examples/windows.png
--------------------------------------------------------------------------------
/examples/guest_mode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shlomki/HomeAssistant-Config/HEAD/examples/guest_mode.png
--------------------------------------------------------------------------------
/packages/Climate/heater_groups.yaml:
--------------------------------------------------------------------------------
1 | group:
2 | All Heaters:
3 | entities:
4 | - switch.riley_heater
--------------------------------------------------------------------------------
/examples/air_conditioning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shlomki/HomeAssistant-Config/HEAD/examples/air_conditioning.png
--------------------------------------------------------------------------------
/examples/mobile_homescreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shlomki/HomeAssistant-Config/HEAD/examples/mobile_homescreen.png
--------------------------------------------------------------------------------
/examples/tablet_homescreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shlomki/HomeAssistant-Config/HEAD/examples/tablet_homescreen.png
--------------------------------------------------------------------------------
/lovelace/cards/quick_status_entrance.yaml:
--------------------------------------------------------------------------------
1 | type: custom:decluttering-card
2 | template: entrance
3 | variables:
4 | - camera_display: 'hide'
5 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/fill_container/fill_container.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | fill_container:
3 | styles:
4 | card:
5 | - height: 100%
--------------------------------------------------------------------------------
/packages/Lights/change_switches_to_lights.yaml:
--------------------------------------------------------------------------------
1 | light:
2 |
3 | - platform: switch
4 | name: Toilet Night Light
5 | entity_id: switch.toilet_night_light
6 |
--------------------------------------------------------------------------------
/packages/Services/zone.yaml:
--------------------------------------------------------------------------------
1 | zone:
2 | - name: Home
3 | latitude: !secret ha_lat
4 | longitude: !secret ha_long
5 | radius: 150
6 | icon: mdi:account-multiple
7 |
--------------------------------------------------------------------------------
/lovelace/views/rooms.yaml:
--------------------------------------------------------------------------------
1 | title: Rooms
2 | path: rooms
3 | icon: mdi:floor-plan
4 | badges: []
5 | panel: true
6 | subview: true
7 |
8 | cards:
9 | - !include /config/lovelace/cards/rooms.yaml
--------------------------------------------------------------------------------
/lovelace/room_cards/bedroom/camera.yaml:
--------------------------------------------------------------------------------
1 | camera_view: live
2 | type: picture-glance
3 | entities: []
4 | camera_image: camera.bedroom
5 | aspect_ratio: 1.33
6 | mode: mse
7 | intersection: 0
8 | muted: true
--------------------------------------------------------------------------------
/lovelace/room_cards/guests/camera.yaml:
--------------------------------------------------------------------------------
1 | type: custom:decluttering-card
2 | template: room_camera
3 | variables:
4 | - camera_entity_hd: 'camera.guests_main'
5 | - camera_entity_sd: 'camera.guests_sub'
6 |
--------------------------------------------------------------------------------
/lovelace/room_cards/office/camera.yaml:
--------------------------------------------------------------------------------
1 | type: custom:decluttering-card
2 | template: room_camera
3 | variables:
4 | - camera_entity_hd: 'camera.office_main'
5 | - camera_entity_sd: 'camera.office_sub'
6 |
--------------------------------------------------------------------------------
/lovelace/room_cards/balcony/camera.yaml:
--------------------------------------------------------------------------------
1 | type: custom:decluttering-card
2 | template: room_camera
3 | variables:
4 | - camera_entity_hd: 'camera.balcony_main'
5 | - camera_entity_sd: 'camera.balcony_sub'
6 |
--------------------------------------------------------------------------------
/lovelace/cards/control_scenes_title.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: Quick Actions
6 |
7 | - !include /config/lovelace/cards/control_scenes.yaml
--------------------------------------------------------------------------------
/packages/Services/default_theme.yaml:
--------------------------------------------------------------------------------
1 | automation:
2 | - alias: 'Set Home Assistant theme at startup'
3 | trigger:
4 | platform: homeassistant
5 | event: start
6 | action:
7 | service: frontend.set_theme
8 | data: minimalist-desktop
--------------------------------------------------------------------------------
/packages/Devices/appliances.yaml:
--------------------------------------------------------------------------------
1 | template:
2 | - sensor:
3 | - name: "Appliances"
4 | state: >
5 | {% if is_state('group.fridges', 'on') %}
6 | Fridge is Open
7 | {% else %}
8 | Ok
9 | {% endif %}
10 |
--------------------------------------------------------------------------------
/lovelace/room_cards/riley/camera.yaml:
--------------------------------------------------------------------------------
1 | type: 'custom:webrtc-camera'
2 | mode: mse
3 | intersection: 0
4 | muted: true
5 | ui: true
6 |
7 | streams:
8 | - entity: camera.riley_main
9 | name: HD
10 |
11 | - entity: camera.riley_sub
12 | name: SD
13 |
14 |
--------------------------------------------------------------------------------
/lovelace/cards/control_shower_container.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: Shower Heating
6 | custom_fields:
7 | buttons:
8 | card:
9 | !include /config/lovelace/cards/control_shower.yaml
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/ha_button_small_label/ha_button_small_label.yaml:
--------------------------------------------------------------------------------
1 | ha-button-small-label:
2 | template: ha-button
3 | styles:
4 | card:
5 | - height: 105px
6 | label:
7 | - font-size: 0.7em
8 | hold_action:
9 | action: more-info
10 |
--------------------------------------------------------------------------------
/lovelace/cards/control_fans_container.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: Fans
6 | custom_fields:
7 | buttons:
8 | card:
9 | !include /config/lovelace/cards/control_fans.yaml
10 |
11 |
--------------------------------------------------------------------------------
/lovelace/cards/control_rooms_container.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: Rooms
6 | custom_fields:
7 | buttons:
8 | card:
9 | !include /config/lovelace/cards/control_rooms.yaml
10 |
--------------------------------------------------------------------------------
/python_scripts/broadlink_send.py:
--------------------------------------------------------------------------------
1 | room = data['room']
2 | packet = data['packet']
3 |
4 | script_service_data = { 'entity_id': 'remote.' + room, 'command': 'b64:' + packet }
5 | options = { 'blocking': True }
6 |
7 | hass.services.call('remote', 'send_command', script_service_data, options)
8 |
--------------------------------------------------------------------------------
/lovelace/cards/control_ac_container.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: Air Conditioning
6 | custom_fields:
7 | buttons:
8 | card:
9 | !include /config/lovelace/cards/control_ac.yaml
10 |
--------------------------------------------------------------------------------
/lovelace/cards/control_scenes_container.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: Quick Actions
6 | custom_fields:
7 | buttons:
8 | card:
9 | !include /config/lovelace/cards/control_scenes.yaml
10 |
--------------------------------------------------------------------------------
/lovelace/cards/control_screens_container.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: Screens
6 | custom_fields:
7 | buttons:
8 | card:
9 | !include /config/lovelace/cards/control_screens.yaml
10 |
11 |
--------------------------------------------------------------------------------
/lovelace/cards/greeting_title.yaml:
--------------------------------------------------------------------------------
1 |
2 | type: vertical-stack
3 | cards:
4 | - type: custom:button-card
5 | template: title
6 | name: >
7 | [[[ return states["sensor.greeting_title"].state; ]]]
8 |
9 | - type: markdown
10 | content: '{{ states(''sensor.greeting_body'') }}'
11 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/config_button/config_button.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | config_button:
3 | template:
4 | - ha-button-long-label
5 | - fill_container
6 | name: "[[[ return entity.attributes.friendly_name.split(' - ')[0]; ]]]"
7 | label: "[[[ return entity.attributes.friendly_name.split(' - ')[1]; ]]]"
8 |
--------------------------------------------------------------------------------
/lovelace/cards/weather_title.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.weather ]]]"
6 |
7 | - !include /config/lovelace/cards/weather.yaml
--------------------------------------------------------------------------------
/lovelace/cards/quick_status_title.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.smart_home_status ]]]"
6 |
7 | - !include /config/lovelace/cards/quick_status.yaml
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/custom_card_vertical_button/custom_card_vertical_button.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | custom_card_vertical_button:
3 | template:
4 | - card_vertical_button
5 | - yellow_on
6 | name: ""
7 | variables:
8 | ulm_card_vertical_button_state: ""
9 | ulm_card_vertical_button_color: ""
10 | styles:
11 | card:
12 | - height: 95px
--------------------------------------------------------------------------------
/lovelace/cards/quick_status_entrance_title.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.entrance ]]]"
6 |
7 | - !include /config/lovelace/cards/quick_status_entrance.yaml
8 |
--------------------------------------------------------------------------------
/lovelace/views/22_riley_camera.yaml:
--------------------------------------------------------------------------------
1 | title: Riley Camera
2 | path: riley-camera
3 | icon: mdi:cctv
4 | badges: []
5 | subview: false
6 | panel: true
7 | cards:
8 | - !include /config/lovelace/room_cards/riley/camera.yaml
9 | # - type: 'custom:webrtc-camera'
10 | # entity: camera.riley
11 | # style: "video {aspect-ratio: 16/9; object-fit: fill;}"
12 |
--------------------------------------------------------------------------------
/lovelace/views/11_hallway.yaml:
--------------------------------------------------------------------------------
1 | title: Hallway
2 | path: hallway
3 | icon: mdi:string-lights
4 | badges: []
5 | panel: false
6 | subview: true
7 |
8 | cards:
9 | - type: vertical-stack
10 | cards:
11 | - type: custom:button-card
12 | template: title-large
13 | name: Hallway
14 |
15 | - !include /config/lovelace/room_cards/hallway/lights.yaml
16 |
17 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/fridge/fridge.yaml:
--------------------------------------------------------------------------------
1 | fridge:
2 | template:
3 | - ha-button
4 | - red_on
5 | state:
6 | - value: 'on'
7 | id: 'on'
8 | icon: mdi:fridge-alert-outline
9 | styles:
10 | icon:
11 | - animation: blink 2s ease infinite
12 | - value: 'off'
13 | id: 'off'
14 | icon: mdi:fridge-outline
15 |
--------------------------------------------------------------------------------
/lovelace/room_cards/office/sensors.yaml:
--------------------------------------------------------------------------------
1 | type: custom:mushroom-chips-card
2 | alignment: center
3 | chips:
4 |
5 | - type: entity
6 | entity: binary_sensor.office_door
7 | content_info: name
8 | name: Door
9 | icon_color: green
10 |
11 | - type: entity
12 | entity: binary_sensor.office_window
13 | content_info: name
14 | name: Window
15 | icon_color: blue
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/camera_view/camera_view.yaml:
--------------------------------------------------------------------------------
1 | camera-view:
2 | template: camera-status
3 | tap_action:
4 | action: fire-dom-event
5 | browser_mod:
6 | service: browser_mod.popup
7 | data:
8 | title: Live View
9 | content:
10 | type: 'custom:webrtc-camera'
11 | entity: |
12 | [[[ return variables.stream; ]]]
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/internet/internet.yaml:
--------------------------------------------------------------------------------
1 | internet:
2 | template:
3 | - ha-button
4 | - green_on
5 | - red_off
6 | state:
7 | - value: 'on'
8 | id: 'on'
9 | icon: mdi:earth
10 |
11 | - value: 'off'
12 | id: 'off'
13 | icon: mdi:earth-remove
14 | styles:
15 | icon:
16 | - animation: blink 2s ease infinite
17 |
--------------------------------------------------------------------------------
/packages/Automations/intercom.yaml:
--------------------------------------------------------------------------------
1 | automation:
2 | - alias: Intercom Turn off after 1 second
3 | mode: parallel
4 | trigger:
5 | - platform: state
6 | entity_id:
7 | - switch.intercom
8 | from: 'off'
9 | to: 'on'
10 | for:
11 | seconds: 1
12 | action:
13 | - service: switch.turn_off
14 | data:
15 | entity_id: switch.intercom
16 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/title/title.yaml:
--------------------------------------------------------------------------------
1 | title:
2 | styles:
3 | card:
4 | - padding: 0.3em
5 | - box-shadow: none
6 | - background: rgb(0,0,0,0)
7 | name:
8 | - font-weight: bold
9 | - font-size: 1.2em
10 | tap_action:
11 | action: none
12 | title-large:
13 | template: title
14 | styles:
15 | name:
16 | - font-weight: bold
17 | - font-size: 1.6emπ
--------------------------------------------------------------------------------
/lovelace/views/15_toilet.yaml:
--------------------------------------------------------------------------------
1 | title: Toilet
2 | path: toilet
3 | icon: mdi:string-lights
4 | badges: []
5 | panel: false
6 | subview: true
7 | cards:
8 | - type: vertical-stack
9 | cards:
10 | - type: custom:button-card
11 | template: title-large
12 | name: Toilet
13 |
14 | - !include /config/lovelace/room_cards/toilet/sensors.yaml
15 |
16 | - !include /config/lovelace/room_cards/toilet/lights.yaml
17 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/room_card/room_card.yaml:
--------------------------------------------------------------------------------
1 | room-card:
2 | template: ha-button
3 | tap_action:
4 | action: fire-dom-event
5 | browser_mod:
6 | service: browser_mod.sequence
7 | data:
8 | sequence:
9 | - service: browser_mod.navigate
10 | data:
11 | path: |
12 | [[[ return variables.room_name; ]]]
13 | - service: browser_mod.close_popup
14 |
--------------------------------------------------------------------------------
/lovelace/cards/ups.yaml:
--------------------------------------------------------------------------------
1 |
2 | type: entities
3 | entities:
4 | - entity: sensor.ups_status
5 | - entity: sensor.ups_battery
6 | - entity: sensor.ups_load
7 | - entity: sensor.ups_time_left
8 | - entity: sensor.ups_time_on_battery
9 | - entity: sensor.ups_transfer_count
10 | - entity: input_datetime.last_power_outage
11 | - entity: input_number.power_outages_today_count
12 | - entity: input_number.power_outages_monthly_count
13 | title: UPS
--------------------------------------------------------------------------------
/packages/Automations/go_to_sleep.yaml:
--------------------------------------------------------------------------------
1 |
2 | input_boolean:
3 | go_to_sleep:
4 | name: Go to Sleep
5 |
6 | script:
7 | play_sleep_sounds:
8 | alias: Play sleep sounds
9 | sequence:
10 | - service: media_player.play_media
11 | entity_id: media_player.bedroom_speaker
12 | data:
13 | media_content_id: 'https://storage.googleapis.com/relaxation-sounds/forest_3600.mp3'
14 | media_content_type: music
15 |
16 |
--------------------------------------------------------------------------------
/packages/Automations/internet_sensor.yaml:
--------------------------------------------------------------------------------
1 | binary_sensor:
2 | # - platform: ping
3 | # host: 8.8.8.8
4 | # name: "Google Connection"
5 | # scan_interval: 60
6 |
7 | - platform: template
8 | sensors:
9 | internet_connection:
10 | friendly_name: Internet Connection
11 | value_template: "{{ states('binary_sensor.google_connection') == 'on' and states('binary_sensor.ubnt_interface_eth10_status') == 'on'}}"
12 | device_class: connectivity
13 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/small_card/small_card.yaml:
--------------------------------------------------------------------------------
1 | small-card:
2 | layout: icon_name
3 | styles:
4 | card:
5 | - height: 30px
6 | - border-radius: 10px 10px 10px 10px
7 | - border-width: 1px !important
8 | - padding: 2%
9 | state:
10 | - value: 'on'
11 | id: 'on'
12 | color: rgb(253, 216, 53)
13 | - value: 'off'
14 | id: 'off'
15 | color: rgb(68, 115, 158)
16 | - value: 'unavailable'
17 | color: lightgray
18 |
--------------------------------------------------------------------------------
/lovelace/cards/quick_status_entrance_container.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.entrance ]]]"
6 | custom_fields:
7 | buttons:
8 | card:
9 | type: vertical-stack
10 | cards:
11 | - !include /config/lovelace/cards/quick_status_entrance.yaml
12 |
--------------------------------------------------------------------------------
/lovelace/cards/control_windows_container.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: Windows
6 | custom_fields:
7 | buttons:
8 | card:
9 | type: vertical-stack
10 | cards:
11 |
12 | - !include /config/lovelace/cards/control_windows_shutters.yaml
13 | - !include /config/lovelace/cards/control_windows_curtains.yaml
14 | - !include /config/lovelace/cards/control_windows_other.yaml
15 |
--------------------------------------------------------------------------------
/lovelace/cards/control_shower_title.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: Shower
6 | show_icon: false
7 | double_tap_action:
8 | action: call-service
9 | service: script.toggle_shower
10 | confirmation:
11 | text: >-
12 | [[[ return 'Are you sure? Turn ' +
13 | (states['group.shower'].state == 'off' ? 'ON' : 'OFF')
14 | + ' Boiler & Heater?' ]]]
15 |
16 | - !include /config/lovelace/cards/control_shower.yaml
--------------------------------------------------------------------------------
/lovelace/views/21_front_door_camera.yaml:
--------------------------------------------------------------------------------
1 | title: Front Door Camera
2 | path: front-door-camera
3 | icon: mdi:cctv
4 | badges: []
5 | panel: true
6 | subview: false
7 | cards:
8 | # - type: vertical-stack
9 | # cards:
10 | # - type: custom:button-card
11 | # template: title-large
12 | # name: Front Door Camera
13 |
14 | - type: custom:decluttering-card
15 | template: room_camera
16 | variables:
17 | - camera_entity_hd: 'camera.front_door_main'
18 | - camera_entity_sd: 'camera.front_door_sub'
--------------------------------------------------------------------------------
/packages/Climate/fan_groups.yaml:
--------------------------------------------------------------------------------
1 | group:
2 | All Fans Except Riley:
3 | entities:
4 | - fan.balcony_fan
5 | - fan.living_room_fan
6 | - fan.guests_fan
7 | - fan.office_fan
8 | - fan.bedroom_fan
9 | - fan.gray_fan
10 | - switch.toilet_vent
11 |
12 | All Fans:
13 | entities:
14 | - fan.balcony_fan
15 | - fan.living_room_fan
16 | - fan.guests_fan
17 | - fan.office_fan
18 | - fan.riley_fan
19 | - fan.bedroom_fan
20 | - fan.gray_fan
21 | - switch.toilet_vent
22 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/card_room_cover_up/card_room_cover_up.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | card_room_cover_up:
3 | icon: mdi:arrow-up
4 | tap_action:
5 | action: call-service
6 | service: cover.open_cover
7 | service_data:
8 | entity_id: |
9 | [[[ return entity.entity_id; ]]]
10 | styles:
11 | img_cell:
12 | - background-color: rgba(var(--color-theme),0.15);
13 |
14 | state:
15 | - operator: "template"
16 | value: "[[[ return !entity?.entity_id ]]]"
17 | styles:
18 | card:
19 | - display: "none"
--------------------------------------------------------------------------------
/lovelace/room_cards/balcony/devices.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: Devices
6 |
7 | - type: horizontal-stack
8 | cards:
9 |
10 | - type: custom:button-card
11 | template: ha-button
12 | entity: fan.balcony_fan
13 | name: Fan
14 | icon: mdi:ceiling-fan
15 | hold_action:
16 | action: more-info
17 |
18 | - type: custom:button-card
19 | template: tv-button
20 | entity: media_player.balcony_tv
21 | name: TV
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/card_room_cover_down/card_room_cover_down.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | card_room_cover_down:
3 | icon: mdi:arrow-down
4 | tap_action:
5 | action: call-service
6 | service: cover.close_cover
7 | service_data:
8 | entity_id: |
9 | [[[ return entity.entity_id; ]]]
10 | styles:
11 | img_cell:
12 | - background-color: rgba(var(--color-theme),0.15);
13 | state:
14 | - operator: "template"
15 | value: "[[[ return !entity?.entity_id ]]]"
16 | styles:
17 | card:
18 | - display: "none"
--------------------------------------------------------------------------------
/lovelace/room_cards/riley/window.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: Window
6 |
7 | - type: horizontal-stack
8 | cards:
9 | - type: custom:button-card
10 | template: ha-button
11 | name: "Window"
12 | entity: binary_sensor.riley_window
13 | state:
14 | - value: "on"
15 | id: 'on'
16 | icon: mdi:window-open-variant
17 | - value: "off"
18 | id: 'off'
19 | icon: mdi:window-closed-variant
20 |
21 |
--------------------------------------------------------------------------------
/lovelace/decluttering_templates/room_camera.yaml:
--------------------------------------------------------------------------------
1 | room_camera:
2 | default:
3 | - camera_entity_hd: camera.living_room_main
4 | - camera_entity_sd: camera.living_room_sub
5 | - interserction: 0
6 | card:
7 | type: 'custom:webrtc-camera'
8 | mode: mse
9 | intersection: '[[interserction]]'
10 | muted: true
11 | ui: true
12 | style: "video {aspect-ratio: 16/9}"
13 |
14 | streams:
15 | - entity: '[[camera_entity_hd]]'
16 | name: HD
17 |
18 | - entity: '[[camera_entity_sd]]'
19 | name: SD
20 |
21 |
--------------------------------------------------------------------------------
/packages/Automations/closet_motion.yaml:
--------------------------------------------------------------------------------
1 | automation:
2 | - alias: Bedroom Closet Light - On motion
3 | id: Bedroom Closet Light on Motion
4 | trigger:
5 | - platform: state
6 | entity_id: binary_sensor.bedroom_closet_motion
7 | from: 'off'
8 | to: 'on'
9 | id: 'on'
10 |
11 | - platform: state
12 | entity_id: binary_sensor.bedroom_closet_motion
13 | from: 'on'
14 | to: 'off'
15 | id: 'off'
16 | action:
17 | - service: "light.turn_{{ trigger.id }}"
18 | entity_id: light.bedroom_closet
19 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/window_room_button/window_room_button.yaml:
--------------------------------------------------------------------------------
1 | window_room_button:
2 | state:
3 | - value: "on"
4 | id: "on"
5 | icon: mdi:window-open-variant
6 | styles:
7 | icon:
8 | - color: "rgba(var(--color-blue),1)"
9 | label:
10 | - color: "rgba(var(--color-blue-text),1)"
11 | name:
12 | - color: "rgba(var(--color-blue-text),1)"
13 | img_cell:
14 | - background-color: "rgba(var(--color-blue), 0.2)"
15 |
16 | - value: "off"
17 | id: "off"
18 | icon: mdi:window-closed-variant
19 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/yellow_fan_only/yellow_fan_only.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | yellow_fan_only:
3 | state:
4 | - styles:
5 | icon:
6 | - color: "rgba(var(--color-yellow),1)"
7 | label:
8 | - color: "rgba(var(--color-yellow-text),1)"
9 | name:
10 | - color: "rgba(var(--color-yellow-text),1)"
11 | img_cell:
12 | - background-color: "rgba(var(--color-yellow), 0.2)"
13 | card:
14 | - background-color: "rgba(var(--color-background-yellow),var(--opacity-bg))"
15 | value: "fan_only"
16 | id: "fan_only"
17 |
--------------------------------------------------------------------------------
/lovelace/cards/weather.yaml:
--------------------------------------------------------------------------------
1 | # type: custom:weather-card
2 | # entity: weather.ims_weather
3 | # current: true
4 | # forecast: true
5 | # hourly_forecast: false
6 | # number_of_forecasts: 6
7 |
8 | type: custom:weather-chart-card
9 | entity: weather.ims_weather
10 | temp: sensor.outside_climate_temperature
11 | humid: sensor.outside_climate_humidity
12 | animated_icons: true
13 | show_wind_direction: false
14 | show_wind_speed: false
15 | show_pressure: false
16 | show_wind_gust_speed: false
17 | forecast:
18 | show_wind_forecast: false
19 | show_probability: true
20 | style: style2
21 | icon_style: style1
22 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/riley_sleeping_room_button/riley_sleeping_room_button.yaml:
--------------------------------------------------------------------------------
1 | riley_sleeping_room_button:
2 | state:
3 | - value: "on"
4 | id: "on"
5 | icon: mdi:sleep
6 | styles:
7 | icon:
8 | - color: "rgba(var(--color-purple),1)"
9 | label:
10 | - color: "rgba(var(--color-purple-text),1)"
11 | name:
12 | - color: "rgba(var(--color-purple-text),1)"
13 | img_cell:
14 | - background-color: "rgba(var(--color-purple), 0.2)"
15 |
16 | - value: "off"
17 | id: "off"
18 | icon: mdi:sleep-off
19 |
--------------------------------------------------------------------------------
/lovelace/cards/control_fans_title.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.fans ]]]"
6 | show_icon: false
7 | double_tap_action:
8 | action: toggle
9 | confirmation:
10 | text: >-
11 | [[[ return 'Are you sure? Turn ' + (entity.state ==
12 | 'off' ? 'ON' : 'OFF') + ' all Fans in the house?'
13 | ]]]
14 |
15 | - !include /config/lovelace/cards/control_fans.yaml
--------------------------------------------------------------------------------
/lovelace/cards/quick_status_internet.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: Internet
6 | custom_fields:
7 | buttons:
8 | card:
9 | type: horizontal-stack
10 | cards:
11 | - type: custom:button-card
12 | template: internet
13 | name: Fiber Connection
14 | entity: binary_sensor.ubnt_interface_eth10_status
15 | size: 35px
16 | - type: custom:button-card
17 | template: internet
18 | entity: binary_sensor.google_connection
19 | size: 35px
--------------------------------------------------------------------------------
/python_scripts/telegram_send_photo_callback.py:
--------------------------------------------------------------------------------
1 | options = { 'blocking': True }
2 |
3 | #Get params
4 | callback_query_id = data['callback_query_id']
5 | callback_data = data['callback_data']
6 | callback_data = callback_data.split(' ')
7 | chat_id = data['chat_id']
8 | file = callback_data[1]
9 |
10 | #Turn on / turn off
11 | hass.services.call('script', 'notify_photo', { 'file': file, 'target': chat_id, 'message': 'Photo' }, options)
12 |
13 | #Send callback that confirms new state
14 | message = 'OK, photo sent.'
15 | hass.services.call('telegram_bot', 'answer_callback_query', { 'callback_query_id': callback_query_id, 'message': message }, options)
16 |
17 |
--------------------------------------------------------------------------------
/lovelace/room_cards/guests/sensors.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.smart_home_status ]]]"
6 |
7 | - type: horizontal-stack
8 | cards:
9 | - type: custom:button-card
10 | template: fridge
11 | entity: binary_sensor.big_freezer
12 | size: 35px
13 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.big_freezer ]]]"
14 |
--------------------------------------------------------------------------------
/lovelace/views/16_bathroom.yaml:
--------------------------------------------------------------------------------
1 | title: Bathroom
2 | path: bathroom
3 | icon: mdi:string-lights
4 | badges: []
5 | panel: false
6 | subview: true
7 |
8 | cards:
9 | - type: vertical-stack
10 | cards:
11 | - type: custom:button-card
12 | template: title-large
13 | name: Bathroom
14 |
15 | - !include /config/lovelace/room_cards/bathroom/sensors.yaml
16 |
17 | - !include /config/lovelace/room_cards/bathroom/lights.yaml
18 |
19 | - !include /config/lovelace/cards/control_shower.yaml
20 |
21 | - type: custom:decluttering-card
22 | template: say_something
23 | variables:
24 | - room_name: bathroom
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/tv_button/tv_button.yaml:
--------------------------------------------------------------------------------
1 | tv-button:
2 | template: ha-button
3 | icon: mdi:television-classic
4 | tap_action:
5 | action: toggle
6 | hold_action:
7 | action: fire-dom-event
8 | browser_mod:
9 | service: browser_mod.popup
10 | data:
11 | title: |
12 | [[[ return entity.attributes.friendly_name; ]]]
13 | content:
14 | type: vertical-stack
15 | cards:
16 | - type: custom:decluttering-card
17 | template: tv_remote
18 | variables:
19 | - entity_id: |
20 | [[[ return entity.entity_id; ]]]
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/camera_status/camera_status.yaml:
--------------------------------------------------------------------------------
1 | camera-status:
2 | template:
3 | - ha-button
4 | - device_tracker_colors
5 | icon: mdi:cctv
6 | state:
7 | - value: "not_home"
8 | id: "not_home"
9 | styles:
10 | icon:
11 | - animation: blink 2s ease infinite
12 | tap_action:
13 | action: fire-dom-event
14 | browser_mod:
15 | service: browser_mod.sequence
16 | data:
17 | sequence:
18 | - service: browser_mod.navigate
19 | data:
20 | path: |
21 | [[[ return variables.navigation_path; ]]]
22 | - service: browser_mod.close_popup
23 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/timer_button/timer_button.yaml:
--------------------------------------------------------------------------------
1 | timer-button:
2 | show_icon: false
3 | color_type: card
4 | variables:
5 | var_name: value
6 | tap_action:
7 | action: call-service
8 | service: input_number.set_value
9 | service_data:
10 | entity_id: |
11 | [[[ return entity.entity_id; ]]]
12 | value: |
13 | [[[ return variables.value; ]]]
14 | styles:
15 | card:
16 | - height: 48px
17 | - border-width: 1px !important
18 | state:
19 | - value: |
20 | [[[ return variables.value; ]]]
21 | color: rgb(253, 216, 53)
22 | - operator: default
23 | color: var(--card-background-color)
--------------------------------------------------------------------------------
/lovelace/cards/control_ac_title.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.air_conditioning ]]]"
6 | show_icon: false
7 | double_tap_action:
8 | action: call-service
9 | service: script.toggle_dampers
10 | confirmation:
11 | text: >-
12 | [[[ return 'Are you sure? Turn ' +
13 | (states['group.dampers'].state == 'off' ? 'ON' :
14 | 'OFF') + ' all ACs in the house?' ]]]
15 |
16 | - !include /config/lovelace/cards/control_ac.yaml
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/gallery_day/gallery_day.yaml:
--------------------------------------------------------------------------------
1 | gallery-day:
2 | template: ha-button
3 | entity: input_text.gallery_display_day
4 | color_type: card
5 | color: white
6 | show_icon: false
7 | styles:
8 | card:
9 | - height: 50px
10 | - padding: 10px
11 | - border-radius: 5%
12 | name: |
13 | [[[ return variables.day.substring(0, 3); ]]]
14 | state:
15 | - value: |
16 | [[[ return variables.day; ]]]
17 | color: rgb(253, 216, 53)
18 | tap_action:
19 | action: call-service
20 | service: input_text.set_value
21 | service_data:
22 | entity_id: input_text.gallery_display_day
23 | value: |
24 | [[[ return variables.day; ]]]
25 |
--------------------------------------------------------------------------------
/lovelace/cards/control_windows_other.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.other ]]]"
6 |
7 | - type: horizontal-stack
8 | cards:
9 |
10 | - type: custom:button-card
11 | template: small-card
12 | entity: binary_sensor.bathroom_window
13 | name: Bathroom
14 | icon: mdi:shower
15 |
16 | - type: custom:button-card
17 | template: small-card
18 | entity: binary_sensor.riley_window
19 | name: Riley
20 | icon: mdi:face-woman-outline
21 |
--------------------------------------------------------------------------------
/packages/Services/notify.yaml:
--------------------------------------------------------------------------------
1 | notify:
2 | - platform: greenapi
3 | name: shlomi_whatsapp
4 | instance_id: !secret whatsapp_instance_id
5 | token: !secret whatsapp_token
6 | target: !secret whatsapp_shlomi
7 |
8 | - platform: greenapi
9 | name: inbal_whatsapp
10 | instance_id: !secret whatsapp_instance_id
11 | token: !secret whatsapp_token
12 | target: !secret whatsapp_inbal
13 |
14 | script:
15 | notify_all:
16 | sequence:
17 | - service: tts.google_translate_say
18 | data:
19 | entity_id: media_player.announcements
20 | message: '{{ message }}'
21 | - service: notify.bffs
22 | data:
23 | message: '{{ message }}'
24 |
25 |
--------------------------------------------------------------------------------
/lovelace/decluttering_templates/tv_remote.yaml:
--------------------------------------------------------------------------------
1 | tv_remote:
2 | card:
3 | type: vertical-stack
4 | cards:
5 | - type: custom:lg-remote-control
6 | entity:
7 | - '[[entity_id]]'
8 | mac: FF:FF:FF:FF:FF:FF
9 | colors:
10 | buttons: var(--card-background-color, white)
11 | sources:
12 | - icon: mdi:netflix
13 | name: Netflix
14 | - icon: mdi:youtube
15 | name: YouTube
16 | - icon: mdi:emby
17 | name: Emby
18 | - icon: mdi:google
19 | name: Google TV
20 | - type: custom:webos-keyboard-card
21 | target: '[[entity_id]]'
22 | label: Enter text here
23 | title: TV Keyboard
24 |
--------------------------------------------------------------------------------
/lovelace/views/19_riley.yaml:
--------------------------------------------------------------------------------
1 | title: Riley
2 | path: riley
3 | icon: mdi:string-lights
4 | badges: []
5 | panel: false
6 | subview: true
7 |
8 | cards:
9 | - type: vertical-stack
10 | cards:
11 | - type: custom:button-card
12 | template: title-large
13 | name: Riley
14 |
15 | - !include /config/lovelace/room_cards/riley/sensors.yaml
16 |
17 | - !include /config/lovelace/room_cards/riley/camera.yaml
18 |
19 | - type: horizontal-stack
20 | cards:
21 |
22 | - !include /config/lovelace/room_cards/riley/lights.yaml
23 |
24 | - !include /config/lovelace/room_cards/riley/devices.yaml
25 |
26 |
27 | #Room Name
28 | #Camera view
29 | #PTZ
30 | #Lights
31 | #Window
32 | #Device
33 |
--------------------------------------------------------------------------------
/lovelace/views/13_balcony.yaml:
--------------------------------------------------------------------------------
1 | title: Balcony
2 | path: balcony
3 | icon: mdi:string-lights
4 | badges: []
5 | panel: false
6 | subview: true
7 | cards:
8 | - type: vertical-stack
9 | cards:
10 | - type: custom:button-card
11 | template: title-large
12 | name: Balcony
13 |
14 | - !include /config/lovelace/room_cards/balcony/camera.yaml
15 |
16 | - !include /config/lovelace/room_cards/balcony/lights.yaml
17 |
18 | - !include /config/lovelace/room_cards/balcony/devices.yaml
19 |
20 | - type: custom:decluttering-card
21 | template: say_something
22 | variables:
23 | - room_name: balcony
24 |
25 | #Room Name
26 | #Camera view
27 | #PTZ
28 | #Lights
29 | #Window
30 | #Device
31 |
--------------------------------------------------------------------------------
/lovelace/room_cards/riley/sensors.yaml:
--------------------------------------------------------------------------------
1 | type: custom:mushroom-chips-card
2 | alignment: center
3 | chips:
4 |
5 | - type: template
6 | icon: mdi:account-circle
7 | content: '{{ ''Awake'' if states(entity) == ''off'' else ''Sleeping''}}'
8 | entity: input_boolean.riley_is_sleeping
9 | picture: /local/photos/riley_awake.jpg
10 | tap_action:
11 | action: call-service
12 | service: input_boolean.toggle
13 | target:
14 | entity_id: input_boolean.riley_is_sleeping
15 |
16 | - type: entity
17 | entity: binary_sensor.riley_door
18 | content_info: name
19 | name: Door
20 | icon_color: green
21 |
22 | - type: entity
23 | entity: binary_sensor.riley_window
24 | content_info: name
25 | name: Window
26 | icon_color: blue
--------------------------------------------------------------------------------
/lovelace/cards/control_lights_title_1row.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.lights ]]]"
6 | entity: light.all_lights
7 | show_icon: false
8 | double_tap_action:
9 | action: toggle
10 | confirmation:
11 | text: >-
12 | [[[ return 'Are you sure? Turn ' + (entity.state ==
13 | 'off' ? 'ON' : 'OFF') + ' all Lights in the house?'
14 | ]]]
15 |
16 | - type: horizontal-stack
17 | cards:
18 | - !include /config/lovelace/cards/control_lights_row1.yaml
19 | - !include /config/lovelace/cards/control_lights_row2.yaml
20 |
--------------------------------------------------------------------------------
/lovelace/cards/control_lights_title_2rows.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.lights ]]]"
6 | entity: light.all_lights
7 | show_icon: false
8 | double_tap_action:
9 | action: toggle
10 | confirmation:
11 | text: >-
12 | [[[ return 'Are you sure? Turn ' + (entity.state ==
13 | 'off' ? 'ON' : 'OFF') + ' all Lights in the house?'
14 | ]]]
15 |
16 | - type: vertical-stack
17 | cards:
18 | - !include /config/lovelace/cards/control_lights_row1.yaml
19 | - !include /config/lovelace/cards/control_lights_row2.yaml
20 |
--------------------------------------------------------------------------------
/python_scripts/telegram_callback.py:
--------------------------------------------------------------------------------
1 | options = { 'blocking': True }
2 |
3 | #Get params
4 | callback_query_id = data['callback_query_id']
5 | callback_data = data['callback_data']
6 | callback_data = callback_data.split(' ')
7 | action = callback_data[0].replace('/', '')
8 | entity_id = callback_data[1]
9 |
10 | #Turn on / turn off
11 | hass.services.call('homeassistant', action, { 'entity_id': entity_id }, options)
12 |
13 | #Send callback that confirms new state
14 | entity_data = hass.states.get(entity_id)
15 | new_state = entity_data.state
16 | entity_name = entity_data.attributes['friendly_name']
17 | message = 'OK, ' + entity_name + ' is now ' + new_state
18 | hass.services.call('telegram_bot', 'answer_callback_query', { 'callback_query_id': callback_query_id, 'message': message }, options)
19 |
--------------------------------------------------------------------------------
/packages/Lights/yule.yaml:
--------------------------------------------------------------------------------
1 | group:
2 | Yule Trees:
3 | entities:
4 | - switch.white_yule_tree
5 | - switch.green_yule_tree
6 |
7 | light:
8 | - platform: template
9 | lights:
10 | yule_trees:
11 | friendly_name: "Yule Trees"
12 | value_template: "{{ is_state('group.yule_trees', 'on') }}" #Are any lights in the group on?
13 | availability_template: "{{ expand('group.yule_trees') | selectattr('state', 'in', ['unavailable']) | list | count == 0 }}" #Are all lights in the group available?
14 | turn_on:
15 | - service: homeassistant.turn_on
16 | data:
17 | entity_id: group.yule_trees
18 | turn_off:
19 | - service: homeassistant.turn_off
20 | data:
21 | entity_id: group.yule_trees
22 |
--------------------------------------------------------------------------------
/lovelace/views/20_bedroom.yaml:
--------------------------------------------------------------------------------
1 | title: Bedroom
2 | path: bedroom
3 | icon: mdi:string-lights
4 | badges: []
5 | panel: false
6 | subview: true
7 | cards:
8 | - type: vertical-stack
9 | cards:
10 | - type: custom:button-card
11 | template: title-large
12 | name: Bedroom
13 |
14 | # - !include /config/lovelace/room_cards/bedroom/camera.yaml
15 |
16 | - !include /config/lovelace/room_cards/bedroom/lights.yaml
17 |
18 | - !include /config/lovelace/room_cards/bedroom/window.yaml
19 |
20 | - !include /config/lovelace/room_cards/bedroom/devices.yaml
21 |
22 | - type: custom:decluttering-card
23 | template: say_something
24 | variables:
25 | - room_name: bedroom
26 |
27 | #Room Name
28 | #Camera view
29 | #PTZ
30 | #Lights
31 | #Window
32 | #Device
33 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/back_button/back_button.yaml:
--------------------------------------------------------------------------------
1 | back-button:
2 | layout: icon_name
3 | name: Back
4 | tap_action:
5 | action: navigate
6 | navigation_path: dashboard
7 | icon: mdi:arrow-left-circle
8 | styles:
9 | name:
10 | - font-weight: bold
11 | - font-size: 30px
12 | - justify-self: start
13 | - padding-left: 10px
14 | card:
15 | - height: 60px
16 | size: 30px
17 | room-temp:
18 | template: climate-button
19 | icon: mdi:temperature-celsius
20 | tap_action:
21 | action: more-info
22 | state:
23 | - value: Hot
24 | icon: mdi:fire
25 | color: red
26 | - value: Ok
27 | color: green
28 | - value: Cold
29 | icon: mdi:snowflake
30 | color: turquoise
31 | styles:
32 | label:
33 | - font-size: 12px
--------------------------------------------------------------------------------
/lovelace/views/12_living_room.yaml:
--------------------------------------------------------------------------------
1 | title: Living Room
2 | path: living-room
3 | icon: mdi:sofa-outline
4 | badges: []
5 | panel: false
6 | subview: true
7 | cards:
8 | - type: vertical-stack
9 | cards:
10 | - type: custom:button-card
11 | template: title-large
12 | name: Living Room
13 |
14 | - !include /config/lovelace/room_cards/living_room/camera.yaml
15 |
16 | - !include /config/lovelace/room_cards/living_room/lights.yaml
17 |
18 | - !include /config/lovelace/room_cards/living_room/window.yaml
19 |
20 | - !include /config/lovelace/room_cards/living_room/devices.yaml
21 |
22 | - type: custom:decluttering-card
23 | template: say_something
24 | variables:
25 | - room_name: living_room
26 |
27 |
28 | #Room Name
29 | #Camera view
30 | #PTZ
31 | #Lights
32 | #Window
33 | #Device
34 |
--------------------------------------------------------------------------------
/lovelace/views/17_office.yaml:
--------------------------------------------------------------------------------
1 | title: Office
2 | path: office
3 | icon: mdi:string-lights
4 | badges: []
5 | panel: false
6 | subview: true
7 |
8 | cards:
9 | - type: vertical-stack
10 | cards:
11 | - type: custom:button-card
12 | template: title-large
13 | name: Office
14 | - !include /config/lovelace/room_cards/office/sensors.yaml
15 |
16 | - !include /config/lovelace/room_cards/office/camera.yaml
17 |
18 | - !include /config/lovelace/room_cards/office/lights.yaml
19 |
20 | - !include /config/lovelace/room_cards/office/window.yaml
21 |
22 | - !include /config/lovelace/room_cards/office/devices.yaml
23 |
24 | - type: custom:decluttering-card
25 | template: say_something
26 | variables:
27 | - room_name: office
28 |
29 | #Room Name
30 | #Camera view
31 | #PTZ
32 | #Lights
33 | #Window
34 | #Device
35 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/room_card_temperature_monitor/room_card_temperature_monitor.yaml:
--------------------------------------------------------------------------------
1 | room_card_temperature_monitor:
2 | label: |
3 | [[[ if (variables && 'temperature_monitor_entity_id' in variables) {
4 | let monitor = states[variables.temperature_monitor_entity_id].state;
5 | let monitor_color = '';
6 | if (monitor.includes('Cold')) {
7 | monitor_color = 'turquoise';
8 | } else if (monitor.includes('Hot')) {
9 | monitor_color = 'red';
10 | }
11 |
12 | if (entity.attributes.temperature != 'unavailable' && entity.attributes.temperature != 'unknown') {
13 | return '
' + entity.attributes.temperature + '°C
';
14 | }
15 | else {
16 | return '';
17 | }
18 | }
19 | ]]]
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Example .gitignore file for your config dir.
2 | # An * ensures that everything will be ignored.
3 | *
4 |
5 | # Ignore folders.
6 | .storage
7 | .cloud
8 | .google.token
9 | tts
10 | custom_components
11 | camera_snaps
12 | shelly
13 | www/camera_snaps
14 |
15 | # files/folders whitelist
16 | !*.yaml
17 | !.gitignore
18 | !*.md
19 | !*.py
20 | !packages
21 | !packages/*
22 | !python_scripts
23 | !custom_components
24 | !custom_components/time_counter.py
25 | !lovelace
26 | !lovelace/*
27 | !lovelace/*/*
28 |
29 | # Ensure these YAML files are ignored, otherwise your secret data/credentials will leak.
30 | ip_bans.yaml
31 | secrets.yaml
32 | known_devices.yaml
33 |
34 | #Other files
35 | .google_maps*
36 | *.db
37 | *.log
38 | *.bak
39 | *.config
40 | config/BroadlinkSwitches
41 | python_scripts/shellies_discovery.py
42 |
43 | #Empty Files
44 | automations.yaml
45 | groups.yaml
46 | scripts.yaml
47 |
--------------------------------------------------------------------------------
/lovelace/room_cards/guests/lights.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.lights ]]]"
6 |
7 | - type: conditional
8 | conditions:
9 | - entity: light.guests_dimmable_lights
10 | state: "on"
11 | card:
12 | type: custom:slider-entity-row
13 | entity: light.guests_lights
14 | full_row: true
15 | min: 1
16 | max: 100
17 | step: 5
18 |
19 | - type: custom:button-card
20 | template: ha-button
21 | entity: light.guests_main
22 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.main ]]]"
23 | icon: mdi:lightbulb-outline
24 | icon_height: 50px
25 |
--------------------------------------------------------------------------------
/lovelace/room_cards/bedroom/wake_up.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 |
4 | - type: horizontal-stack
5 | cards:
6 | - type: 'custom:time-picker-card'
7 | entity: input_datetime.click_to_wake_up
8 | hour_mode: 24
9 | hide:
10 | name: true
11 |
12 | - type: 'custom:button-card'
13 | template:
14 | - ha-button
15 | - fill_container
16 | icon: mdi:alarm-plus
17 | entity: script.click_to_wake_up_add_a_new_schedule
18 | name: Add
19 | styles:
20 | card:
21 | - width: 60px
22 |
23 | - type: custom:auto-entities
24 | show_empty: false
25 | card:
26 | type: entities
27 | title: Active Alarms
28 | show_header_toggle: false
29 | sort:
30 | method: name
31 | filter:
32 | include:
33 | - entity_id: "*schedule_wake_up_at*"
34 | domain: switch
35 |
--------------------------------------------------------------------------------
/packages/Services/spotify.yaml:
--------------------------------------------------------------------------------
1 | # spotify:
2 | # client_id: !secret spotify_client_id
3 | # client_secret: !secret spotify_client_secret
4 |
5 | # spotcast:
6 | # sp_dc: !secret sp_dc
7 | # sp_key: !secret sp_key
8 |
9 | # sensor:
10 | # - platform: spotcast
11 |
12 | automation:
13 | - alias: Spotify cast to CC Audio
14 | trigger:
15 | platform: state
16 | entity_id:
17 | - media_player.everywhere
18 | - media_player.balcony_and_living_room
19 | - media_player.cc_audio
20 | to: 'playing'
21 | action:
22 | - service: media_player.select_source
23 | entity_id: media_player.amplifier
24 | data:
25 | source: CC Audio
26 | target:
27 | entity_id: media_player.amplifier
28 | - service: media_player.volume_set
29 | data:
30 | volume_level: 1
31 | target:
32 | entity_id: media_player.cc_audio
33 |
--------------------------------------------------------------------------------
/lovelace_advanced.yaml:
--------------------------------------------------------------------------------
1 | title: Advanced Config
2 |
3 | wallpanel:
4 | enabled: false
5 | hide_toolbar: true
6 | hide_sidebar: true
7 | idle_time: 0
8 |
9 | decluttering_templates: !include_dir_merge_named /config/lovelace/decluttering_templates/
10 |
11 | # button_card_templates: !include_dir_merge_named /config/lovelace/button_card_templates/
12 | button_card_templates: !include_dir_merge_named "custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/"
13 |
14 | views:
15 | - !include /config/lovelace/views/07_config.yaml
16 | - !include /config/lovelace/views/06_sensors.yaml
17 | - !include /config/lovelace/views/08_config_ac.yaml
18 | - !include /config/lovelace/views/03_ac.yaml
19 | - !include /config/lovelace/views/02_front_door.yaml
20 | - !include /config/lovelace/views/05_googlespeakers.yaml
21 | - !include /config/lovelace/views/09_servers.yaml
22 | - !include /config/lovelace/views/10_dev.yaml
23 |
--------------------------------------------------------------------------------
/packages/Automations/timers.yaml:
--------------------------------------------------------------------------------
1 | sensor:
2 | - platform: time_date
3 | display_options:
4 | - "time"
5 | - "date"
6 | - "date_time"
7 | - "date_time_utc"
8 | - "time_date"
9 | - "time_utc"
10 |
11 | input_datetime:
12 | dawn:
13 | name: Dawn
14 | has_date: false
15 | has_time: true
16 | morning:
17 | name: Morning
18 | has_date: false
19 | has_time: true
20 | late_morning:
21 | name: Late Morning
22 | has_date: false
23 | has_time: true
24 | noon:
25 | name: Noon
26 | has_date: false
27 | has_time: true
28 | evening:
29 | name: Evening
30 | has_date: false
31 | has_time: true
32 | evening_2:
33 | name: Evening 2
34 | has_date: false
35 | has_time: true
36 | night:
37 | name: Night
38 | has_date: false
39 | has_time: true
40 | late_night:
41 | name: Late Night
42 | has_date: false
43 | has_time: true
44 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/container/container.yaml:
--------------------------------------------------------------------------------
1 | container:
2 | tap_action:
3 | action: none
4 | double_tap_action:
5 | action: none
6 | hold_action:
7 | action: none
8 | styles:
9 | card:
10 | - padding: 0
11 | - border-style: solid
12 | - border-width: 1px
13 | name:
14 | - padding: 0.3em
15 | - box-shadow: none
16 | - background: rgb(0,0,0,0.05)
17 | - border-radius: 0.4em 0.4em 0 0
18 | - padding: 0.8em
19 | - width: 100%
20 | - font-weight: bold
21 | grid:
22 | - grid-template-areas: '"i" "n" "buttons"'
23 | - grid-template-columns: 1fr
24 | - grid-template-rows: 1fr min-content min-content
25 | custom_fields:
26 | buttons:
27 | - padding: 0.3em 0.5em 0.3em 0.5em
28 | - border-width: 15px
29 | - background: var( --lovelace-background, var(--primary-background-color) )
30 | - text-align: left
--------------------------------------------------------------------------------
/packages/Devices/cameras.yaml:
--------------------------------------------------------------------------------
1 | group:
2 | cameras:
3 | entities:
4 | - camera.front_door_sub
5 | - camera.living_room_sub
6 | # - camera.hallway
7 | - camera.office_sub
8 | - camera.guests_sub
9 | - camera.riley_sub
10 | # - camera.bedroom
11 |
12 | cameras_device_trackers:
13 | entities:
14 | - device_tracker.ubnt_device_camera_balcony
15 | - device_tracker.ubnt_device_camera_frontdoor
16 | - device_tracker.ubnt_device_camera_livingroom
17 | # - device_tracker.ubnt_device_camera_hallway
18 | - device_tracker.ubnt_device_camera_office
19 | - device_tracker.ubnt_device_camera_guests
20 | - device_tracker.ubnt_device_camera_riley
21 | # - device_tracker.ubnt_device_camera_bedroom
22 |
23 | template:
24 | - binary_sensor:
25 | - name: Cameras Online
26 | state: "{{ expand('group.cameras_device_trackers') | selectattr('state', 'in', ['unavailable', 'unknown', 'not_home' ]) | list | length == 0 }}"
27 |
28 |
--------------------------------------------------------------------------------
/lovelace/room_cards/hallway/lights.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.lights ]]]"
6 |
7 | - type: horizontal-stack
8 | cards:
9 |
10 | - type: "custom:button-card"
11 | template:
12 | - custom_card_light
13 | - fill_container
14 | entity: light.hallway_front
15 | variables:
16 | ulm_card_light_enable_slider: true
17 | ulm_card_light_name: "Front"
18 | ulm_card_light_icon: mdi:led-strip-variant
19 |
20 | - type: "custom:button-card"
21 | template:
22 | - custom_card_light
23 | - fill_container
24 | entity: light.hallway_back
25 | variables:
26 | ulm_card_light_enable_slider: true
27 | ulm_card_light_name: "Back"
28 | ulm_card_light_icon: mdi:led-strip-variant
29 |
--------------------------------------------------------------------------------
/lovelace/views/18_guests.yaml:
--------------------------------------------------------------------------------
1 | title: Guests
2 | path: guests
3 | icon: mdi:string-lights
4 | badges: []
5 | panel: false
6 | subview: true
7 |
8 | cards:
9 | - type: vertical-stack
10 | cards:
11 | - type: custom:button-card
12 | template: title-large
13 | name: Guests
14 |
15 | - !include /config/lovelace/room_cards/guests/camera.yaml
16 |
17 | - type: horizontal-stack
18 | cards:
19 | - !include /config/lovelace/room_cards/guests/sensors.yaml
20 |
21 | - !include /config/lovelace/room_cards/guests/lights.yaml
22 |
23 | - type: horizontal-stack
24 | cards:
25 |
26 | - !include /config/lovelace/room_cards/guests/window.yaml
27 |
28 | - !include /config/lovelace/room_cards/guests/devices.yaml
29 |
30 |
31 | - type: custom:decluttering-card
32 | template: say_something
33 | variables:
34 | - room_name: guests
35 |
36 | #Room Name
37 | #Camera view
38 | #PTZ
39 | #Lights
40 | #Window
41 | #Device
42 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/device_tracker_colors/device_tracker_colors.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | device_tracker_colors:
3 | state:
4 | - styles:
5 | icon:
6 | - color: "rgba(var(--color-red),1)"
7 | label:
8 | - color: "rgba(var(--color-red-text),1)"
9 | name:
10 | - color: "rgba(var(--color-red-text),1)"
11 | img_cell:
12 | - background-color: "rgba(var(--color-red), 0.2)"
13 | card:
14 | - background-color: "rgba(var(--color-background-red),var(--opacity-bg))"
15 | value: "not_home"
16 | id: "not_home"
17 |
18 | - styles:
19 | icon:
20 | - color: "rgba(var(--color-green),1)"
21 | label:
22 | - color: "rgba(var(--color-green-text),1)"
23 | name:
24 | - color: "rgba(var(--color-green-text),1)"
25 | img_cell:
26 | - background-color: "rgba(var(--color-green), 0.2)"
27 | card:
28 | - background-color: "rgba(var(--color-background-green),var(--opacity-bg))"
29 | value: "home"
30 | id: "home"
31 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/ha_button_mushroom/mushroom_button.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | mushroom_button:
3 | template: yellow_on
4 | show_label: true
5 | label: ""
6 | styles:
7 | icon:
8 | - color: "rgba(var(--color-theme),0.2)"
9 | label:
10 | - justify-self: "center"
11 | - align-self: "start"
12 | - font-weight: "bolder"
13 | - font-size: "12px"
14 | - filter: "opacity(40%)"
15 | name:
16 | - margin-top: "10px"
17 | - justify-self: "center"
18 | - font-weight: "bold"
19 | - font-size: "14px"
20 | img_cell:
21 | - background-color: "rgba(var(--color-theme),0.05)"
22 | - border-radius: "50%"
23 | - place-self: "center"
24 | - width: "42px"
25 | - height: "42px"
26 | grid:
27 | - grid-template-areas: "'i' 'n' 'l'"
28 | card:
29 | - border-radius: "var(--border-radius)"
30 | - box-shadow: "var(--box-shadow)"
31 | - padding: "10px 0px 8px 0px"
32 | - height: 95px
33 | size: "20px"
34 | tap_action:
35 | action: "toggle"
36 | hold_action:
37 | action: "more-info"
38 |
--------------------------------------------------------------------------------
/packages/Services/say_something.yaml:
--------------------------------------------------------------------------------
1 | input_text:
2 | say_something_living_room:
3 | name: Say Something
4 | max: 255
5 | say_something_balcony:
6 | name: Say Something
7 | max: 255
8 | say_something_office:
9 | name: Say Something
10 | max: 255
11 | say_something_guests:
12 | name: Say Something
13 | max: 255
14 | say_something_bathroom:
15 | name: Say Something
16 | max: 255
17 | say_something_bedroom:
18 | name: Say Something
19 | max: 255
20 |
21 | input_select:
22 | say_something_language:
23 | name: Language
24 | options:
25 | - Hebrew
26 | - English
27 |
28 | script:
29 | send_annoucement:
30 | alias: "Send Annoucement"
31 | sequence:
32 | - service: "tts.{{ 'cloud_say' if is_state('input_select.say_something_language', 'Hebrew') else 'google_translate_say' }}"
33 | data:
34 | entity_id: "media_player.{{ room_name }}_speaker"
35 | message: "{{ states('input_text.say_something_' + room_name) }}"
36 | language: "{{ 'he-IL' if is_state('input_select.say_something_language', 'Hebrew') else 'en-us' }}"
37 |
--------------------------------------------------------------------------------
/packages/Services/zigbee2mqtt.yaml:
--------------------------------------------------------------------------------
1 | input_boolean:
2 | z2m_living_room_permit_join:
3 | name: Zigbee2MQTT Living Room Permit Join
4 | z2m_bedroom_permit_join:
5 | name: Zigbee2MQTT Bedroom Permit Join
6 |
7 |
8 | automation:
9 | - id: Zigbee2MQTT Permit Join
10 | alias: Zigbee2MQTT Permit Join
11 | mode: parallel
12 | trigger:
13 | - platform: state
14 | entity_id:
15 | - input_boolean.z2m_living_room_permit_join
16 | - input_boolean.z2m_bedroom_permit_join
17 | from:
18 | - "on"
19 | - "off"
20 | to:
21 | - "on"
22 | - "off"
23 | action:
24 | - service: mqtt.publish
25 | data:
26 | topic: "zigbee2mqtt{{'-bedroom' if trigger.to_state.entity_id == 'input_boolean.z2m_bedroom_permit_join' }}/bridge/request/permit_join"
27 | payload: "{\"value\": {{ 'true' if trigger.to_state.state == 'on' else 'off' }}, \"time\": 240}"
28 | - delay:
29 | minutes: 4
30 | - service: input_boolean.turn_off
31 | data:
32 | entity_id: "{{ trigger.to_state.entity_id }}"
33 |
--------------------------------------------------------------------------------
/lovelace/room_cards/living_room/camera.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:state-switch
4 | entity: hash
5 | default: living_room
6 | states:
7 | living_room:
8 | type: custom:decluttering-card
9 | template: room_camera
10 | variables:
11 | - camera_entity_hd: 'camera.living_room_main'
12 | - camera_entity_sd: 'camera.living_room_sub'
13 |
14 | front_door:
15 | type: custom:decluttering-card
16 | template: room_camera
17 | variables:
18 | - camera_entity_hd: 'camera.front_door_main'
19 | - camera_entity_sd: 'camera.front_door_sub'
20 | - interserction: 0.5
21 |
22 | - type: horizontal-stack
23 | cards:
24 | - type: custom:button-card
25 | name: Living Room
26 | tap_action:
27 | action: navigate
28 | navigation_path: "[[[ return (window.location.hash == '#entities') ? '.' : '#living_room'; ]]]"
29 | - type: custom:button-card
30 | name: Front Door
31 | tap_action:
32 | action: navigate
33 | navigation_path: "[[[ return (window.location.hash == '#entities') ? '.' : '#front_door'; ]]]"
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/notification/notification.yaml:
--------------------------------------------------------------------------------
1 | notification:
2 | layout: icon_name
3 | size: 28%
4 | custom_fields:
5 | button:
6 | card:
7 | type: custom:button-card
8 | aspect_ratio: 1/1
9 | entity: |
10 | [[[ return variables.silence_entity; ]]]
11 | show_name: false
12 | tap_action:
13 | action: toggle
14 | hold_action:
15 | action: more-info
16 | state:
17 | - value: 'off'
18 | id: 'off'
19 | icon: mdi:bell-badge-outline
20 | color: red
21 | - value: 'on'
22 | id: 'on'
23 | icon: mdi:bell-check-outline
24 | color: var(--primary-text-color)
25 | styles:
26 | card:
27 | - border-width: 1px !important
28 |
29 |
30 | styles:
31 | grid:
32 | - grid-template-areas: '"i n button"'
33 | card:
34 | - padding: 10px 0
35 | custom_fields:
36 | button:
37 | - padding: 10px 10px 10px 10px
38 | - width: 50px
39 | - visibility: |
40 | [[[ return (states[variables.notification_entity].state == "on") ? "visible" : "hidden"; ]]]
41 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/card_room_5_entities/card_room_5_entities.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | card_room_5_entities:
3 | styles:
4 | grid:
5 | - grid-template-areas: "[[[ return !variables?.entity_1 ? (!variables?.entity_2 ? `'n n n' 'l l i3' 'i i i4'` : `'n n i2' 'l l i3' 'i i i4'`) : `'n n n i1' 'l l l i2' 'i i . i3' 'i i i5 i4'`; ]]]"
6 | custom_fields:
7 | i5:
8 | - border-radius: "50%"
9 | - width: "80%"
10 | - height: "80%"
11 | - line-height: 0
12 | - display: "grid"
13 | custom_fields:
14 | i5:
15 | card:
16 | type: "custom:button-card"
17 | template: >
18 | [[[
19 | let templates = [ 'widget_icon_room' ];
20 | if (variables?.entity_5?.templates?.length) {
21 | templates.push(...variables.entity_5.templates);
22 | }
23 | return templates;
24 | ]]]
25 | variables: "[[[ return variables?.entity_5; ]]]"
26 | state:
27 | - operator: "template"
28 | value: "[[[ return !variables.entity_5; ]]]"
29 | styles:
30 | card:
31 | - display: "none"
32 | entity: "[[[ return variables?.entity_5?.entity_id; ]]]"
33 |
--------------------------------------------------------------------------------
/lovelace/room_cards/office/window.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: Office
6 |
7 | - type: horizontal-stack
8 | cards:
9 | - type: vertical-stack
10 | cards:
11 | - type: custom:button-card
12 | template: cover-up
13 | entity: cover.office_shutter
14 | - type: custom:button-card
15 | template: cover-stop
16 | entity: cover.office_shutter
17 | icon: mdi:window-shutter
18 | variables:
19 | window_entity_ids: binary_sensor.office_window
20 | triggers_update: binary_sensor.office_window
21 | - type: custom:button-card
22 | template: cover-down
23 | entity: cover.office_shutter
24 |
25 | - type: vertical-stack
26 | cards:
27 | - type: custom:button-card
28 | template: cover-up
29 | entity: cover.office_curtain
30 | - type: custom:button-card
31 | template: cover-stop
32 | entity: cover.office_curtain
33 | icon: mdi:curtains
34 | - type: custom:button-card
35 | template: cover-down
36 | entity: cover.office_curtain
37 |
38 |
--------------------------------------------------------------------------------
/lovelace/room_cards/bedroom/window.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: Window
6 |
7 | - type: horizontal-stack
8 | cards:
9 | - type: vertical-stack
10 | cards:
11 | - type: custom:button-card
12 | template: cover-up
13 | entity: cover.bedroom_shutter
14 | - type: custom:button-card
15 | template: cover-stop
16 | entity: cover.bedroom_shutter
17 | icon: mdi:window-shutter
18 | variables:
19 | window_entity_ids: binary_sensor.bedroom_window
20 | triggers_update: binary_sensor.bedroom_window
21 | - type: custom:button-card
22 | template: cover-down
23 | entity: cover.bedroom_shutter
24 |
25 | - type: vertical-stack
26 | cards:
27 | - type: custom:button-card
28 | template: cover-up
29 | entity: cover.bedroom_curtain
30 | - type: custom:button-card
31 | template: cover-stop
32 | entity: cover.bedroom_curtain
33 | icon: mdi:curtains
34 | - type: custom:button-card
35 | template: cover-down
36 | entity: cover.bedroom_curtain
37 |
38 |
--------------------------------------------------------------------------------
/packages/Automations/smoke_sensors.yaml:
--------------------------------------------------------------------------------
1 | group:
2 | Smoke Sensors:
3 | entities:
4 | - binary_sensor.hallway_front_smoke
5 | - binary_sensor.hallway_back_smoke
6 | - binary_sensor.electricity_closet_smoke
7 |
8 | automation:
9 | - alias: Smoke - send notification
10 | mode: parallel
11 | trigger:
12 | - platform: state
13 | entity_id:
14 | - binary_sensor.hallway_front_smoke
15 | - binary_sensor.hallway_back_smoke
16 | - binary_sensor.electricity_closet_smoke
17 | from: "off"
18 | to: "on"
19 | action:
20 | - repeat:
21 | count: 5
22 | sequence:
23 | - service: notify.bffs
24 | data:
25 | message: "Fire detected at home!!! Location: {{ trigger.to_state.attributes.friendly_name | replace(' Smoke smoke', '') }} 🔥🔥🔥"
26 | - delay:
27 | seconds: 2
28 |
29 | - alias: Smoke - blink lights
30 | mode: parallel
31 | trigger:
32 | - platform: state
33 | entity_id: binary_sensor.hallway_front_smoke
34 | from: "off"
35 | to: "on"
36 | action:
37 | - service: script.blink_light
38 | data:
39 | light_entity_id: light.living_room_curtain_light
40 |
--------------------------------------------------------------------------------
/lovelace/room_cards/bathroom/sensors.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.smart_home_status ]]]"
6 |
7 | - type: horizontal-stack
8 | cards:
9 | - type: custom:button-card
10 | template: ha-button
11 | entity: input_select.laundry_machine_status
12 | size: 35px
13 | styles:
14 | label:
15 | - font-size: 10px
16 | show_label: true
17 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.laundry_machine ]]]"
18 | state:
19 | - value: 'Idle'
20 | icon: mdi:washing-machine
21 | color: green
22 |
23 | - value: 'Running'
24 | label: 'Running'
25 | icon: mdi:washing-machine
26 | color: orange
27 |
28 | - value: 'Clean'
29 | label: 'Clean'
30 | icon: mdi:washing-machine-alert
31 | color: red
32 | styles:
33 | icon:
34 | - animation: blink 2s ease infinite
35 |
36 |
--------------------------------------------------------------------------------
/lovelace/room_cards/guests/window.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: Shutter
6 |
7 | - type: horizontal-stack
8 | cards:
9 | - type: vertical-stack
10 | cards:
11 | - type: custom:button-card
12 | template: cover-up
13 | entity: cover.guests_shutter
14 | - type: custom:button-card
15 | template: cover-stop
16 | entity: cover.guests_shutter
17 | icon: mdi:window-shutter
18 | variables:
19 | window_entity_ids: binary_sensor.guests_window
20 | triggers_update: binary_sensor.guests_window
21 | - type: custom:button-card
22 | template: cover-down
23 | entity: cover.guests_shutter
24 |
25 | # - type: vertical-stack
26 | # cards:
27 | # - type: custom:button-card
28 | # template: cover-up
29 | # entity: cover.guests_curtain
30 | # - type: custom:button-card
31 | # template: cover-stop
32 | # entity: cover.guests_curtain
33 | # icon: mdi:curtains
34 | # - type: custom:button-card
35 | # template: cover-down
36 | # entity: cover.guests_curtain
37 |
38 |
--------------------------------------------------------------------------------
/lovelace/room_cards/bathroom/lights.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.lights ]]]"
6 |
7 | - type: horizontal-stack
8 | cards:
9 | - type: custom:button-card
10 | template: ha-button
11 | entity: light.bathroom_main
12 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.main ]]]"
13 | icon: mdi:lightbulb-outline
14 |
15 | - type: custom:button-card
16 | template: ha-button
17 | entity: light.bathroom_laundry
18 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.laundry ]]]"
19 | icon: mdi:washing-machine
20 |
21 | - type: custom:button-card
22 | template: ha-button
23 | entity: light.bathroom_cabinet
24 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.cabinet ]]]"
25 | icon: mdi:faucet-variant
26 |
27 |
--------------------------------------------------------------------------------
/lovelace/room_cards/toilet/lights.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.lights ]]]"
6 |
7 | - type: horizontal-stack
8 | cards:
9 | - type: custom:button-card
10 | template: ha-button
11 | entity: light.toilet_main
12 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.main ]]]"
13 | icon: mdi:lightbulb-outline
14 |
15 | - type: custom:button-card
16 | template: ha-button
17 | entity: light.toilet_night_light
18 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.night_light ]]]"
19 | icon: mdi:lightbulb-night-outline
20 |
21 | - type: custom:button-card
22 | template: ha-button
23 | entity: switch.toilet_vent
24 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.vent ]]]"
25 | icon: mdi:hvac
26 | hold_action:
27 | action: more-info
28 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/ha_button/ha_button.yaml:
--------------------------------------------------------------------------------
1 | # ha-button:
2 | # styles:
3 | # card:
4 | # - height: 105px
5 | # - border-radius: 15px
6 | # - border-width: 1px !important
7 | # name:
8 | # - padding-bottom: 10px
9 | # size: 33%
10 | # hold_action:
11 | # action: more-info
12 | # state:
13 | # - value: 'on'
14 | # id: 'on'
15 | # color: rgb(253, 216, 53)
16 | # - value: 'off'
17 | # id: 'off'
18 | # color: rgb(68, 115, 158)
19 | # - value: 'unavailable'
20 | # color: lightgray
21 |
22 | ha-button:
23 | template: mushroom_button
24 |
25 | ha-button-long-name:
26 | template: ha-button
27 | styles:
28 | name:
29 | - white-space: normal
30 | - padding: 0px 2px 0px 2px
31 | - place-self: normal
32 | grid:
33 | - grid-template-rows: 1fr 1fr min-content min-content
34 |
35 | ha-button-long-label:
36 | template: ha-button-long-name
37 | styles:
38 | label:
39 | - white-space: normal
40 | - text-overflow: clip
41 | - place-self: normal
42 | - overflow: visible
43 | grid:
44 | - grid-template-rows: 1fr min-content 0.5fr min-content
45 |
46 |
47 | ha-button-half:
48 | template: ha-button
49 | layout: icon_name
50 | styles:
51 | card:
52 | - height: 48px
53 | name:
54 | - font-size: 0.8em
55 | - padding: 0px
--------------------------------------------------------------------------------
/packages/Climate/white_fans.yaml:
--------------------------------------------------------------------------------
1 | input_boolean:
2 | show_fans_in_ui:
3 | name: Show Fans in UI
4 |
5 | fan:
6 | - platform: xiaomi_miio_fan
7 | name: Guests Fan
8 | host: !secret xiaomi_guests_fan_ip
9 | token: !secret xiaomi_guests_fan_token
10 |
11 | - platform: xiaomi_miio_fan
12 | name: Riley Fan
13 | host: !secret xiaomi_riley_fan_ip
14 | token: !secret xiaomi_riley_fan_token
15 |
16 | input_text:
17 | temp_fan_angle:
18 |
19 | script:
20 | reset_fan:
21 | sequence:
22 | - service: xiaomi_miio_fan.fan_set_child_lock_on
23 | data:
24 | entity_id: '{{ entity_id }}'
25 |
26 | - service: input_text.set_value
27 | entity_id: input_text.temp_fan_angle
28 | data:
29 | value: "{{ state_attr(entity_id, 'angle') }}"
30 |
31 | - service: xiaomi_miio_fan.fan_set_oscillation_angle
32 | data:
33 | entity_id: '{{ entity_id }}'
34 | angle: 140
35 |
36 | - service: fan.oscillate
37 | data:
38 | entity_id: '{{ entity_id }}'
39 | oscillating: True
40 |
41 | - delay:
42 | seconds: 30
43 |
44 | - service: xiaomi_miio_fan.fan_set_oscillation_angle
45 | data:
46 | entity_id: '{{ entity_id }}'
47 | angle: "{{ states('input_text.temp_fan_angle') }}"
48 |
49 | - service: xiaomi_miio_fan.fan_set_child_lock_off
50 | data:
51 | entity_id: '{{ entity_id }}'
--------------------------------------------------------------------------------
/lovelace/cards/quick_status_laundry_machine.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.laundry_machine ]]]"
6 | custom_fields:
7 | buttons:
8 | card:
9 | type: horizontal-stack
10 | cards:
11 | - type: custom:button-card
12 | template: ha-button
13 | entity: input_select.laundry_machine_status
14 | size: 35px
15 | styles:
16 | label:
17 | - font-size: 10px
18 | show_label: true
19 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.laundry_machine ]]]"
20 | state:
21 | - value: 'Idle'
22 | icon: mdi:washing-machine
23 | color: green
24 |
25 | - value: 'Running'
26 | label: 'Running'
27 | icon: mdi:washing-machine
28 | color: orange
29 |
30 | - value: 'Clean'
31 | label: 'Clean'
32 | icon: mdi:washing-machine-alert
33 | color: red
34 | styles:
35 | icon:
36 | - animation: blink 2s ease infinite
--------------------------------------------------------------------------------
/packages/Devices/balcony_power.yaml:
--------------------------------------------------------------------------------
1 |
2 | automation:
3 | - id: Balcony Power - Turn on after power outage
4 | alias: Balcony Power - Turn on after power outage
5 | trigger:
6 | - platform: state
7 | entity_id: input_boolean.power_outage
8 | from: "on"
9 | to: "off"
10 | for:
11 | minutes: 1
12 | action:
13 | - service: notify.shlomi
14 | data:
15 | message: "Turning balcony peripherals power back on"
16 |
17 | # Turn on the balcony peripherals power
18 | - service: switch.turn_on
19 | target:
20 | entity_id: switch.balcony_peripherals_power
21 |
22 | - wait_for_trigger:
23 | - platform: state
24 | entity_id: input_boolean.power_outage
25 | from: "off"
26 | to: "on"
27 | timeout:
28 | seconds: 10
29 | continue_on_timeout: true
30 |
31 | - if:
32 | #If there was another outage just after turning peripherals on (possible water leakage), turn off this automation so it doesn't turn peripherals back on
33 | - condition: template
34 | value_template: "{{ wait.remaining > 0 }}"
35 | then:
36 | - service: notify.shlomi
37 | data:
38 | message: "There was another outage, balcony peripherals will stay off (possible water leakage in the balcony)"
39 | - service: automation.turn_off
40 | target:
41 | entity_id: automation.balcony_power_turn_on_after_power_outage
42 |
--------------------------------------------------------------------------------
/lovelace/decluttering_templates/say_something.yaml:
--------------------------------------------------------------------------------
1 | say_something:
2 | card:
3 | type: vertical-stack
4 | cards:
5 | - type: custom:button-card
6 | template: title
7 | name: Say Something
8 |
9 | - type: entities
10 | entities:
11 |
12 | - type: custom:lovelace-multiline-text-input-card
13 | autosave: true
14 | entity: input_text.say_something_[[room_name]]
15 | max_length: 250
16 | min_length: 0
17 |
18 | - entity: input_select.say_something_language
19 | icon: mdi:translate
20 |
21 | - type: custom:slider-entity-row
22 | entity: 'media_player.[[room_name]]_speaker'
23 | name: Volume
24 |
25 | # - type: 'custom:button-card'
26 | # template: ha-button
27 | # entity: input_select.say_something_language
28 | # name: English
29 | # state:
30 | # - value: English
31 | # - value: Hebrew
32 | # - type: 'custom:button-card'
33 | # template: ha-button
34 | # entity: input_select.say_something_language
35 | # name: Hebrew
36 | # state:
37 | # - value: English
38 | # - value: Hebrew
39 |
40 | - type: call-service
41 | name: ' '
42 | icon: 'mdi:voice'
43 | action_name: Play it
44 | service: script.send_annoucement
45 | service_data:
46 | room_name: '[[room_name]]'
47 |
--------------------------------------------------------------------------------
/packages/Devices/parking_gates.yaml:
--------------------------------------------------------------------------------
1 | rest_command:
2 | open_sarters_parking_gate:
3 | url: !secret sarter_parking_gate_url
4 | method: "POST"
5 | payload: !secret sarter_parking_gate_payload
6 | timeout: 20
7 |
8 | script:
9 | open_lower_gate_online:
10 | alias: Open Lower Gate Online
11 | sequence:
12 | - service: google_assistant_sdk.send_text_command
13 | data:
14 | command: "Open Lower Parking Gate"
15 |
16 | open_michelles_parking_gate_online:
17 | alias: Open Michelle's Parking Gate Online
18 | sequence:
19 | - service: google_assistant_sdk.send_text_command
20 | data:
21 | command: "Open Michelle's Parking 2"
22 |
23 | open_sarters_parking_gate_online:
24 | alias: Open Sarters Parking Gate Online
25 | sequence:
26 | - service: rest_command.open_sarters_parking_gate
27 |
28 | automation:
29 | - alias: Parking gates - Turn off remotes after 3 seconds
30 | mode: parallel
31 | trigger:
32 | - platform: state
33 | entity_id:
34 | - switch.lower_gate
35 | - switch.upper_gate
36 | from: 'off'
37 | to: 'on'
38 | for:
39 | seconds: 3
40 | action:
41 | - service: switch.turn_off
42 | data:
43 | entity_id: '{{ trigger.to_state.entity_id }}'
44 |
45 | - alias: Parking gates - open lower gate online
46 | mode: parallel
47 | trigger:
48 | - platform: state
49 | entity_id:
50 | - switch.lower_gate
51 | from: 'off'
52 | to: 'on'
53 | action:
54 | - service: script.open_lower_gate_online
--------------------------------------------------------------------------------
/packages/Services/weather.yaml:
--------------------------------------------------------------------------------
1 | # weather:
2 | # - platform: template
3 | # name: "Outside Weather"
4 | # condition_template: "{{ states('weather.ims_weather') }}"
5 | # temperature_template: "{{ states('sensor.outside_climate_temperature') }}"
6 | # temperature_unit: "°C"
7 | # humidity_template: "{{ states('sensor.outside_climate_humidity') }}"
8 | # forecast_template: "{{ state_attr('weather.ims_weather', 'forecast') }}"
9 |
10 | # - platform: template
11 | # name: "Max Temp"
12 | # condition_template: "{{ states('weather.ims_weather') }}"
13 | # temperature_template: "{{ state_attr('weather.ims_weather', 'forecast')[0].temperature }}"
14 | # temperature_unit: "°C"
15 | # humidity_template: "{{ states('sensor.outside_climate_humidity') }}"
16 | # forecast_template: "{{ state_attr('weather.ims_weather', 'forecast') }}"
17 |
18 | # template:
19 | # - sensor:
20 | # - name: "Weather Description"
21 | # state: "{{ state_attr('sensor.weather_description', states('weather.outside_weather')) }}"
22 | # attributes:
23 | # clear-night: Clear night
24 | # cloudy: Many clouds
25 | # exceptional: Exceptional
26 | # fog: Fog
27 | # hail: Hail
28 | # lightning: Lightning / thunderstorms
29 | # lightning-rainy: Lightning / thunderstorms and rain
30 | # partlycloudy: Partly cloudy
31 | # pouring: Pouring rain
32 | # rainy: Rain
33 | # snowy: Snow
34 | # snowy-rainy: Snow and Rain
35 | # sunny: Sunshine
36 | # windy: Wind
37 | # windy-variant: Wind and clouds
--------------------------------------------------------------------------------
/packages/Automations/water_leak_sensors.yaml:
--------------------------------------------------------------------------------
1 | group:
2 | Water Leak Sensors:
3 | entities:
4 | - binary_sensor.kitchen_closet_leak
5 | - binary_sensor.bathroom_closet_leak
6 | - binary_sensor.bathroom_floor_leak
7 | - binary_sensor.air_conditioner_leak
8 |
9 | automation:
10 | - alias: Bathroom closet water leak notify
11 | trigger:
12 | - platform: state
13 | entity_id: binary_sensor.bathroom_closet_leak
14 | from: 'off'
15 | to: 'on'
16 | action:
17 | - service: script.notify_all
18 | data:
19 | message: Water is leaking in the bathroom lower closet!
20 |
21 | - alias: Bathroom floor water leak notify
22 | trigger:
23 | - platform: state
24 | entity_id:
25 | - binary_sensor.bathroom_floor_leak
26 | from: 'off'
27 | to: 'on'
28 | action:
29 | - service: script.notify_all
30 | data:
31 | message: The bathroom floor is flooded with water!
32 |
33 | - alias: Kitchen closet water leak notify
34 | trigger:
35 | - platform: state
36 | entity_id: binary_sensor.kitchen_closet_leak
37 | from: 'off'
38 | to: 'on'
39 | action:
40 | - service: script.notify_all
41 | data:
42 | message: Water is leaking in the kitchen closet!
43 |
44 | - alias: Air Conditioner water leak notify
45 | trigger:
46 | - platform: state
47 | entity_id: binary_sensor.air_conditioner_leak
48 | from: 'off'
49 | to: 'on'
50 | action:
51 | - service: script.notify_all
52 | data:
53 | message: Water is leaking in the air conditioner unit!
54 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/card_room_cover_stop/card_room_cover_stop.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | card_room_cover_stop:
3 | tap_action:
4 | action: call-service
5 | service: cover.stop_cover
6 | service_data:
7 | entity_id: |
8 | [[[ return entity?.entity_id; ]]]
9 |
10 | state:
11 | - operator: "template"
12 | value: "[[[ return !entity?.entity_id ]]]"
13 | styles:
14 | card:
15 | - display: "none"
16 |
17 | - icon: mdi:stop
18 | value: "opening"
19 | id: "opening"
20 | styles:
21 | icon:
22 | - color: "rgba(var(--color-theme),0.2)"
23 | img_cell:
24 | - background-color: "rgba(var(--color-theme),0.15)"
25 |
26 | - icon: mdi:stop
27 | styles:
28 | icon:
29 | - color: "rgba(var(--color-theme),0.2)"
30 | img_cell:
31 | - background-color: "rgba(var(--color-theme),0.15)"
32 | value: "closing"
33 | id: "closing"
34 |
35 | - styles:
36 | icon:
37 | - color: "rgba(var(--color-yellow),1)"
38 | label:
39 | - color: "rgba(var(--color-yellow-text),1)"
40 | name:
41 | - color: "rgba(var(--color-yellow-text),1)"
42 | img_cell:
43 | - background-color: "rgba(var(--color-yellow), 0.2)"
44 | card:
45 | - background-color: "rgba(var(--color-background-yellow),var(--opacity-bg))"
46 | value: "open"
47 | id: "open"
48 |
49 | - styles:
50 | icon:
51 | - color: "rgba(var(--color-theme),0.2)"
52 | img_cell:
53 | - background-color: "rgba(var(--color-theme),0.15)"
54 |
55 | value: "closed"
56 | id: "closed"
57 |
--------------------------------------------------------------------------------
/lovelace/room_cards/balcony/lights.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.lights ]]]"
6 |
7 | - type: conditional
8 | conditions:
9 | - entity: light.balcony_string_lights
10 | state: "on"
11 | card:
12 | type: custom:slider-entity-row
13 | entity: light.balcony_string_lights
14 | full_row: true
15 | min: 1
16 | max: 100
17 | step: 5
18 |
19 | - type: horizontal-stack
20 | cards:
21 | - type: custom:button-card
22 | template: ha-button
23 | entity: light.balcony_string_lights
24 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.string_lights ]]]"
25 | icon: mdi:string-lights
26 | icon_height: 50px
27 |
28 | - type: custom:button-card
29 | template: ha-button
30 | entity: light.balcony_main
31 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.main ]]]"
32 | icon: mdi:wall-sconce-outline
33 | icon_height: 50px
34 |
35 | - type: custom:button-card
36 | template: ha-button
37 | entity: light.balcony_fan
38 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.fan_light ]]]"
39 | icon: mdi:ceiling-fan-light
40 | icon_height: 50px
41 |
42 |
--------------------------------------------------------------------------------
/lovelace/room_cards/riley/lights.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.lights ]]]"
6 |
7 | # - type: conditional
8 | # conditions:
9 | # - entity: light.riley_main
10 | # state: "on"
11 | # card:
12 | # type: custom:slider-entity-row
13 | # entity: light.riley_main
14 | # full_row: true
15 | # min: 1
16 | # max: 100
17 | # step: 5
18 |
19 | # - type: custom:button-card
20 | # template: ha-button
21 | # entity: light.riley_main
22 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.main ]]]"
23 | # icon: mdi:lightbulb-outline
24 | # lock:
25 | # enabled: >-
26 | # [[[ return
27 | # states["input_boolean.riley_is_sleeping"].state
28 | # == "on" ]]]
29 | # duration: 3
30 |
31 |
32 | - type: "custom:button-card"
33 | template:
34 | - custom_card_light
35 | - fill_container
36 | entity: light.riley_main
37 | variables:
38 | ulm_card_light_enable_slider: true
39 | ulm_card_light_enable_collapse: false
40 | ulm_card_light_name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.main ]]]"
41 | icon: mdi:lightbulb-outline
42 | lock:
43 | enabled: >-
44 | [[[ return
45 | states["input_boolean.riley_is_sleeping"].state
46 | == "on" ]]]
47 | duration: 3
--------------------------------------------------------------------------------
/lovelace_portrait.yaml:
--------------------------------------------------------------------------------
1 | title: Home
2 |
3 | wallpanel:
4 | enabled: false
5 | hide_toolbar: true
6 | hide_sidebar: true
7 | idle_time: 0
8 |
9 | decluttering_templates: !include_dir_merge_named /config/lovelace/decluttering_templates/
10 |
11 | # button_card_templates: !include_dir_merge_named /config/lovelace/button_card_templates/
12 | button_card_templates: !include_dir_merge_named "custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/"
13 |
14 | views:
15 | - !include /config/lovelace/views/01_dashboard.yaml
16 | - !include /config/lovelace/views/schedule.yaml
17 | - !include /config/lovelace/views/smart_home_config.yaml
18 |
19 | - !include /config/lovelace/views/02_front_door.yaml
20 | # - !include /config/lovelace/views/03_ac.yaml
21 | # - !include /config/lovelace/views/04_power.yaml
22 | # - !include /config/lovelace/views/05_googlespeakers.yaml
23 | # - !include /config/lovelace/views/06_sensors.yaml
24 | # - !include /config/lovelace/views/07_config.yaml
25 | # - !include /config/lovelace/views/08_config_ac.yaml
26 | # - !include /config/lovelace/views/09_servers.yaml
27 | # - !include /config/lovelace/views/10_dev.yaml
28 | - !include /config/lovelace/views/11_hallway.yaml
29 | - !include /config/lovelace/views/12_living_room.yaml
30 | - !include /config/lovelace/views/13_balcony.yaml
31 | - !include /config/lovelace/views/15_toilet.yaml
32 | - !include /config/lovelace/views/16_bathroom.yaml
33 | - !include /config/lovelace/views/17_office.yaml
34 | - !include /config/lovelace/views/18_guests.yaml
35 | - !include /config/lovelace/views/19_riley.yaml
36 | - !include /config/lovelace/views/20_bedroom.yaml
37 | - !include /config/lovelace/views/rooms.yaml
38 |
--------------------------------------------------------------------------------
/lovelace_landscape.yaml:
--------------------------------------------------------------------------------
1 | title: Home
2 |
3 | wallpanel:
4 | enabled: true
5 | hide_toolbar: true
6 | hide_sidebar: true
7 | idle_time: 0
8 |
9 | decluttering_templates: !include_dir_merge_named /config/lovelace/decluttering_templates/
10 |
11 | # button_card_templates: !include_dir_merge_named /config/lovelace/button_card_templates/
12 | button_card_templates: !include_dir_merge_named "custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/"
13 |
14 | views:
15 | - !include /config/lovelace/views/01_dashboard_landscape.yaml
16 | - !include /config/lovelace/views/02_front_door.yaml
17 | - !include /config/lovelace/views/smart_home_config.yaml
18 | - !include /config/lovelace/views/schedule.yaml
19 | # - !include /config/lovelace/views/03_ac.yaml
20 | # - !include /config/lovelace/views/04_power.yaml
21 | # - !include /config/lovelace/views/05_googlespeakers.yaml
22 | # - !include /config/lovelace/views/06_sensors.yaml
23 | # - !include /config/lovelace/views/07_config.yaml
24 | # - !include /config/lovelace/views/08_config_ac.yaml
25 | # - !include /config/lovelace/views/09_servers.yaml
26 | # - !include /config/lovelace/views/10_dev.yaml
27 | # - !include /config/lovelace/views/11_hallway.yaml
28 |
29 | - !include /config/lovelace/views/12_living_room.yaml
30 | - !include /config/lovelace/views/13_balcony.yaml
31 | - !include /config/lovelace/views/15_toilet.yaml
32 | - !include /config/lovelace/views/16_bathroom.yaml
33 | - !include /config/lovelace/views/17_office.yaml
34 | - !include /config/lovelace/views/18_guests.yaml
35 | - !include /config/lovelace/views/19_riley.yaml
36 | - !include /config/lovelace/views/20_bedroom.yaml
37 | - !include /config/lovelace/views/rooms.yaml
38 |
--------------------------------------------------------------------------------
/lovelace/views/schedule.yaml:
--------------------------------------------------------------------------------
1 | title: schedule
2 | path: schedule
3 | icon: mdi:timer-cog-outline
4 | badges: []
5 | cards:
6 | - type: custom:scheduler-card
7 | title: "Smart Home Schedules"
8 | time_step: 5
9 | include:
10 | - climate.ac_damper_bedroom
11 | - climate.ac_damper_guests
12 | - climate.ac_damper_living_room
13 | - climate.ac_damper_office
14 | - climate.ac_damper_riley
15 | - cover.bedroom_shutter
16 | - cover.bedroom_curtain
17 | - cover.guests_shutter
18 | - cover.kitchen_curtain
19 | - cover.kitchen_shutter
20 | - cover.living_room_curtain
21 | - cover.living_room_shutter
22 | - cover.office_curtain
23 | - cover.office_shutter
24 | - lock.front_door
25 | - script.housekeeper_unlock_and_lock_door
26 | - group.bffs
27 | - input_boolean.guest_mode
28 | - switch.riley_heater
29 | - light.yule_trees
30 | - light.office_bff_light
31 | - light.living_room_side_lamp
32 | - light.living_room_lights
33 | - light.office_lights
34 | - light.balcony_lights
35 | - light.kitchen_lights
36 | - light.hallway_lights
37 | - light.toilet_lights
38 | - light.bathroom_lights
39 | - light.office_lights
40 | - light.guests_lights
41 | - light.riley_lights
42 | - light.bedroom_lights
43 | - input_number.water_boiler_timer_duration
44 | - input_number.water_boiler_wanted_showers
45 | - input_select.water_boiler_heating_method
46 | - switch.water_boiler
47 | - switch.water_boiler_with_hot_shower_check
48 | - switch.shlomi_pc
49 | - script.click_to_wake_up
50 | - switch.bedroom_right_bed_light_switches_sync
51 |
52 | exclude: []
53 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/tablet_button/tablet_button.yaml:
--------------------------------------------------------------------------------
1 | tablet-button:
2 | template: ha-button
3 | variables:
4 | var_name: tablet_id
5 | var_name2: tablet_friendly_name
6 | entity: |
7 | [[[ return 'switch.' + variables.tablet_id + '_screen'; ]]]
8 | icon: mdi:tablet-cellphone
9 | name: |
10 | [[[ return variables.tablet_friendly_name; ]]]
11 | double_tap_action:
12 | action: call-service
13 | service: script.toggle_tablet_volume
14 | service_data:
15 | entity_id: |
16 | [[[ return 'input_number.' + variables.tablet_id + '_volume'; ]]]
17 | default_value: 5
18 | tap_action:
19 | action: toggle
20 | hold_action:
21 | action: fire-dom-event
22 | browser_mod:
23 | service: browser_mod.popup
24 | data:
25 | title: |
26 | [[[ return variables.tablet_friendly_name; ]]]
27 | content:
28 | type: vertical-stack
29 | cards:
30 | - type: custom:decluttering-card
31 | template: tablet_control
32 | variables:
33 | - tablet_id: |
34 | [[[ return variables.tablet_id; ]]]
35 | styles:
36 | custom_fields:
37 | volume_muted:
38 | - position: absolute
39 | - left: "-5%"
40 | - top: 5%
41 | - height: 60px
42 | - width: 60px
43 | - visibility: |
44 | [[[
45 | if (states['input_number.' + variables.tablet_id + '_volume'].state === "0.0") return "visible";
46 | return "hidden";
47 | ]]]
48 | custom_fields:
49 | volume_muted: >
50 | [[[ return ''; ]]]
52 |
--------------------------------------------------------------------------------
/lovelace/room_cards/office/devices.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: Devices
6 |
7 | - type: horizontal-stack
8 | cards:
9 |
10 | - type: conditional
11 | conditions:
12 | - entity: input_boolean.simple_smart_home_mode
13 | state: "off"
14 | card:
15 | type: custom:button-card
16 | template: climate-button
17 | entity: climate.ac_damper_office
18 | name: "AC"
19 | icon: mdi:monitor
20 | variables:
21 | window_entity_ids: binary_sensor.office_window
22 | temperature_monitor_entity_id: sensor.office_temperature_monitor
23 | damper_name: ac_damper_office
24 | triggers_update:
25 | - binary_sensor.office_window
26 | - sensor.office_temperature_monitor
27 | - timer.ac_damper_office
28 |
29 | - type: custom:button-card
30 | template: ha-button
31 | entity: fan.office_fan
32 | name: "Fan"
33 | icon: mdi:ceiling-fan
34 | hold_action:
35 | action: more-info
36 | styles:
37 | card:
38 | - height: 115px
39 |
40 | - type: custom:button-card
41 | template: ha-button
42 | icon: mdi:laptop
43 | entity: switch.shlomi_pc
44 | tap_action:
45 | action: toggle
46 | hold_action:
47 | action: more-info
48 | name: Shlomi's PC
49 | icon_height: 50px
50 | confirmation:
51 | text: >-
52 | [[[ return "Are you sure? Turn " + (entity.state == "off" ?
53 | "ON" : "OFF") + " Shlomi's PC?" ]]]
54 | styles:
55 | card:
56 | - height: 115px
--------------------------------------------------------------------------------
/python_scripts/ceiling_light_set_level.py:
--------------------------------------------------------------------------------
1 | options = { 'blocking': True }
2 |
3 | room = data['room']
4 | input_number_entity = "input_number." + room + "_light_level"
5 | input_boolean_entity = "input_boolean." + room + "_script_running"
6 |
7 | if hass.states.get(input_boolean_entity).state != "on":
8 | hass.services.call('input_boolean', 'turn_on', { 'entity_id': input_boolean_entity }, options)
9 |
10 | current_brightness_level = int(float(hass.states.get(input_number_entity).state))
11 | new_brightness_level = round(int(data['new_brightness_level']) / 14.1666)
12 | difference = new_brightness_level - current_brightness_level
13 | script_service_data = { 'room': room }
14 |
15 | if (new_brightness_level == 18):
16 | hass.services.call('script', "ceiling_light_brightness_highest" , script_service_data, options)
17 | hass.services.call('input_number', 'set_value', { 'entity_id': input_number_entity, 'value': 18 }, options)
18 | elif (new_brightness_level == 0):
19 | hass.services.call('script', "ceiling_light_brightness_lowest" , script_service_data, options)
20 | hass.services.call('input_number', 'set_value', { 'entity_id': input_number_entity, 'value': 0 }, options)
21 | else:
22 | entity = ""
23 | if difference <= 0:
24 | entity = "ceiling_light_brightness_down"
25 | step = -1
26 | else:
27 | entity = "ceiling_light_brightness_up"
28 | step = 1
29 |
30 | for i in range(current_brightness_level, new_brightness_level + step, step):
31 | hass.services.call('script', entity, script_service_data, options)
32 | hass.services.call('input_number', 'set_value', { 'entity_id': input_number_entity, 'value': i }, options)
33 |
34 | hass.services.call('input_boolean', 'turn_off', { 'entity_id': input_boolean_entity }, options)
35 |
--------------------------------------------------------------------------------
/lovelace/cards/control_scenes.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 |
4 | - type: horizontal-stack
5 | cards:
6 | - type: custom:button-card
7 | template:
8 | - ha-button
9 | - purple_on
10 | entity: switch.evening_scene
11 | action: toggle
12 | name: Evening
13 | icon: mdi:floor-lamp-outline
14 | lock:
15 | enabled: true
16 |
17 | - type: custom:button-card
18 | template:
19 | - ha-button
20 | - purple_on
21 | entity: switch.sleep_scene
22 | name: Sleep
23 | icon: mdi:sleep
24 | lock:
25 | enabled: true
26 | - type: custom:button-card
27 | template:
28 | - ha-button
29 | - purple_on
30 | entity: switch.housekeeper_unlock_and_lock_door
31 | name: Housekeeper
32 | icon: mdi:silverware-clean
33 | tap_action:
34 | action: toggle
35 | lock:
36 | enabled: true
37 |
38 | - type: horizontal-stack
39 | cards:
40 |
41 | - type: custom:button-card
42 | template:
43 | - ha-button
44 | - purple_on
45 | entity: script.dance_freeze_game
46 | action: toggle
47 | name: Dance Freeze Game
48 | icon: mdi:human-female-dance
49 | lock:
50 | enabled: true
51 |
52 | - type: custom:button-card
53 | template:
54 | - ha-button
55 | - purple_on
56 | entity: switch.office_meeting_scene
57 | action: toggle
58 | name: Office Meeting
59 | icon: mdi:message-video
60 | lock:
61 | enabled: true
62 |
63 | - type: custom:button-card
64 | color-type: blank-card
65 | styles:
66 | card:
67 | - display: none
68 |
--------------------------------------------------------------------------------
/packages/Automations/coming_home.yaml:
--------------------------------------------------------------------------------
1 | automation:
2 | - alias: Coming Home - Inbal is Home
3 | id: Coming Home - Inbal is Home
4 | trigger:
5 | - platform: state
6 | entity_id: person.inbal
7 | from: not_home
8 | to: home
9 |
10 | action:
11 | - service: notify.bffs
12 | data:
13 | message: 'Bffushkit is {{trigger.to_state.state}}'
14 |
15 | - service: script.navigate_to_entrace_card
16 | data:
17 | browser_id: "{{ trigger.to_state.entity_id | replace('person.', '') }}_app"
18 |
19 | - alias: Coming Home - Shlomi is Home
20 | id: Coming Home - Shlomi is Home
21 | trigger:
22 | - platform: state
23 | entity_id: person.shlomi
24 | from: not_home
25 | to: home
26 | action:
27 | - service: notify.bffs
28 | data:
29 | message: 'Bffush is {{ trigger.to_state.state }}'
30 |
31 | - service: script.navigate_to_entrace_card
32 | data:
33 | browser_id: "{{ trigger.to_state.entity_id | replace('person.', '') }}_app"
34 |
35 | script:
36 | navigate_to_entrace_card:
37 | mode: parallel
38 | variables:
39 | camera_display: hide
40 | title: Entrance
41 | sequence:
42 | - alias: "Wait until the Home Assistant app connection is available"
43 | wait_template: "{{ is_state('sensor.' + browser_id + '_browser_visibility', 'visible') }}"
44 | timeout:
45 | seconds: 30
46 | continue_on_timeout: false
47 |
48 | - service: browser_mod.popup
49 | data:
50 | title: "{{ title }}"
51 | content:
52 | type: custom:decluttering-card
53 | template: entrance
54 | variables:
55 | - camera_display: "{{ camera_display }}"
56 | browser_id:
57 | - "{{ browser_id }}"
58 |
--------------------------------------------------------------------------------
/lovelace/views/03_ac.yaml:
--------------------------------------------------------------------------------
1 | icon: mdi:temperature-celsius
2 | path: ac
3 | title: AC
4 | visible:
5 | - user: 954f920b6d6b4dd795e5ea5ab3f225d5
6 | - user: 9ccaeb57363d4902b296eb297da459e3
7 | - user: 441ffac368ed4f50911212c0816b227a
8 | - user: aa6d3713da1a4e1eac92dd176a3ae708
9 | badges: []
10 | cards:
11 | - type: custom:button-card
12 | template: back-button
13 |
14 | - type: vertical-stack
15 | cards:
16 | - type: conditional
17 | conditions:
18 | - entity: input_boolean.manual_ac
19 | state: "off"
20 | card:
21 | type: thermostat
22 | entity: climate.mainac
23 | - type: conditional
24 | conditions:
25 | - entity: input_boolean.manual_ac
26 | state: "on"
27 | card:
28 | type: thermostat
29 | entity: climate.manual_ac
30 | - columns: 4
31 | entities:
32 | - entity: sensor.outside_climate_temperature
33 | name: Outside
34 | - entity: sensor.outside_climate_humidity
35 | name: Outside
36 | - entity: sensor.bedroom_closet_climate_temperature
37 | name: Closet
38 | - entity: sensor.bedroom_closet_climate_humidity
39 | name: Closet
40 | show_icon: true
41 | show_state: true
42 | title: Other
43 | type: glance
44 | - type: entities
45 | entities:
46 | - sensor.water_boiler_temperature_top
47 | - sensor.water_boiler_temperature_middle
48 | - sensor.water_boiler_temperature_bottom
49 | - sensor.water_boiler_temperature
50 | - sensor.hot_showers_available
51 |
52 |
53 | - type: entities
54 | entities:
55 | - sensor.water_boiler_temperature_top_average
56 | - sensor.water_boiler_temperature_middle_adjusted_average
57 | - sensor.water_boiler_temperature_bottom_average
58 | - sensor.hot_showers_available_average
59 |
--------------------------------------------------------------------------------
/packages/Automations/riley_is_sleeping.yaml:
--------------------------------------------------------------------------------
1 | input_boolean:
2 | riley_is_sleeping:
3 |
4 | script:
5 | update_riley_sleeping_status:
6 | sequence:
7 | - service: input_boolean.turn_{{ status }}
8 | entity_id: input_boolean.riley_is_sleeping
9 |
10 | input_datetime:
11 | riley_goes_to_sleep:
12 | name: Riley Goes to Sleep
13 | has_date: false
14 | has_time: true
15 |
16 | automation:
17 | - id: Riley is Sleeping - Start
18 | alias: Riley is Sleeping - Start
19 | trigger:
20 | - platform: state
21 | entity_id:
22 | - switch.house_tablet_screen
23 | - switch.black_tablet_screen
24 | from: "off"
25 | to: "on"
26 | - platform: state
27 | entity_id: sensor.house_tablet_foreground_app
28 | to: "com.mcu.reolink"
29 | condition:
30 | - alias: "At night time"
31 | condition: time
32 | after: input_datetime.riley_goes_to_sleep
33 | before: input_datetime.dawn
34 | action:
35 | - service: input_boolean.turn_on
36 | entity_id: input_boolean.riley_is_sleeping
37 |
38 | - id: Riley is Sleeping - End
39 | alias: Riley is Sleeping - End
40 | trigger:
41 | - platform: time
42 | at: input_datetime.dawn
43 | action:
44 | - service: input_boolean.turn_off
45 | entity_id: input_boolean.riley_is_sleeping
46 |
47 | - id: Riley Light - Turn off when no motion
48 | alias: Riley Light - Turn off when no motion
49 | trigger:
50 | - platform: state
51 | entity_id: binary_sensor.riley_motion
52 | from: "on"
53 | to: "off"
54 | for:
55 | minutes: 30
56 | condition:
57 | - and:
58 | - alias: "Riley light is on"
59 | condition: state
60 | entity_id: light.riley_main
61 | state: "on"
62 | - alias: "Riley is awake"
63 | condition: state
64 | entity_id: input_boolean.riley_is_sleeping
65 | state: "off"
66 | action:
67 | - service: light.turn_off
68 | target:
69 | entity_id: light.riley_main
--------------------------------------------------------------------------------
/packages/Automations/bathroom.yaml:
--------------------------------------------------------------------------------
1 | automation:
2 | - alias: Bathroom light on motion
3 | mode: single
4 | trigger:
5 | - platform: state
6 | entity_id: binary_sensor.bathroom_door
7 | from: "off"
8 | to: "on"
9 | action:
10 | - choose:
11 | - conditions:
12 | - condition: time
13 | after: input_datetime.morning
14 | before: input_datetime.evening_2
15 | sequence:
16 | - service: light.turn_on
17 | entity_id: light.bathroom_main
18 | - conditions:
19 | - condition: time
20 | after: input_datetime.evening_2
21 | before: input_datetime.morning
22 | sequence:
23 | - service: light.turn_on
24 | entity_id: light.bathroom_cabinet
25 | - delay:
26 | seconds: 5
27 |
28 | - alias: Bathroom light off when no motion
29 | trigger:
30 | - platform: state
31 | entity_id: binary_sensor.bathroom_motion
32 | from: "on"
33 | to: "off"
34 | for:
35 | minutes: 25
36 | action:
37 | - service: light.turn_off
38 | entity_id:
39 | - light.bathroom_main
40 | - light.bathroom_cabinet
41 |
42 | switch:
43 | - platform: broadlink
44 | mac: !secret office_mac
45 | switches:
46 | - name: Bathroom Cabinet Smart Plug
47 | command_on: "shQyABEFEQUHEAcQEQUHEBEGEQYHEBEGBxAHEBEGEQYRBgcQBhAGEBEGBhARBREFBhARBQaiAAAAAAAA"
48 | command_off: "shIyABEFEQUGEAYQBhARBQYQBxARBQYQEQYGohEFEQUGEAYQEQUHEBEFEQUHEBEFBxAGEBEFAAAAAAAA"
49 |
50 | group:
51 | shower:
52 | entities:
53 | - switch.water_boiler
54 | - switch.bathroom_heater
55 |
56 | script:
57 | toggle_shower:
58 | variables:
59 | action: switch.turn_{{ 'on' if states('group.shower') == 'off' else 'off' }}
60 | sequence:
61 | - service: "{{ action }}"
62 | entity_id: switch.water_boiler
63 | - delay:
64 | seconds: 2
65 | - service: "{{ action }}"
66 | entity_id: switch.bathroom_heater
67 |
--------------------------------------------------------------------------------
/packages/Automations/rain_sensor.yaml:
--------------------------------------------------------------------------------
1 | automation:
2 | # - alias: Close shutters for open windows when raining
3 | # trigger:
4 | # - platform: state
5 | # entity_id: sensor.rain
6 | # from: 'off'
7 | # to: 'on'
8 | # condition:
9 | # - condition: state
10 | # entity_id: group.windows
11 | # state: 'on'
12 | # action:
13 |
14 | - alias: Rain - Notification
15 | id: Rain - Notification
16 | trigger:
17 | - platform: state
18 | entity_id: binary_sensor.rain
19 | from: 'off'
20 | to: 'on'
21 | - platform: state
22 | entity_id: binary_sensor.rain
23 | from: 'on'
24 | to: 'off'
25 | action:
26 | - choose:
27 | - conditions:
28 | - condition: and
29 | conditions:
30 | - condition: template
31 | value_template: "{{ trigger.to_state.state == 'on' }}"
32 | - condition: state
33 | entity_id: group.windows
34 | state: 'on'
35 | sequence:
36 | - service: notify.shlomi
37 | data:
38 | message: >
39 | It's raining! These windows are open: {%- for entity_id in states.group.windows.attributes.entity_id -%}
40 | {% set parts = entity_id.split('.') -%}
41 | {%- if states(entity_id) == 'on' %}
42 | {%- if loop.first %} {% elif loop.last %}, {% else %}, {% endif -%}{{ states[parts[0]][parts[1]].name | replace(" Window", "") }}{% endif -%}
43 | {%- endfor %}
44 | - conditions:
45 | - condition: template
46 | value_template: "{{ trigger.to_state.state == 'on' }}"
47 | sequence:
48 | - service: notify.shlomi
49 | data:
50 | message: It's raining!
51 | - conditions:
52 | - condition: template
53 | value_template: "{{ trigger.to_state.state == 'off' }}"
54 | sequence:
55 | - service: notify.shlomi
56 | data:
57 | message: It's not raining anymore!
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/card_room_6_entities/card_room_6_entities.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | card_room_6_entities:
3 | styles:
4 | name:
5 | - font-size: "16px"
6 | - margin-top: "5%"
7 | - margin-bottom: "-2%"
8 | - align-self: center
9 | label:
10 | - margin-top: "4%"
11 | grid:
12 | - grid-template-areas: "'n n n n' 'l l i4 i1' 'i i i5 i2''i i i6 i3'"
13 | - grid-template-columns: 0.5fr 1fr 1fr 1fr;
14 | - grid-template-rows: 0.5fr 1fr 1fr 1fr;
15 | custom_fields:
16 | i5:
17 | - border-radius: "50%"
18 | - width: "80%"
19 | - height: "80%"
20 | - line-height: 0
21 | - display: "grid"
22 |
23 | i6:
24 | - border-radius: "50%"
25 | - width: "80%"
26 | - height: "80%"
27 | - line-height: 0
28 | - display: "grid"
29 |
30 | custom_fields:
31 | i5:
32 | card:
33 | type: "custom:button-card"
34 | template: >
35 | [[[
36 | let templates = [ 'widget_icon_room' ];
37 | if (variables?.entity_5?.templates?.length) {
38 | templates.push(...variables.entity_5.templates);
39 | }
40 | return templates;
41 | ]]]
42 | variables: "[[[ return variables?.entity_5; ]]]"
43 | state:
44 | - operator: "template"
45 | value: "[[[ return !variables.entity_5; ]]]"
46 | styles:
47 | card:
48 | - display: "none"
49 | entity: "[[[ return variables?.entity_5?.entity_id; ]]]"
50 |
51 | i6:
52 | card:
53 | type: "custom:button-card"
54 | template: >
55 | [[[
56 | let templates = [ 'widget_icon_room' ];
57 | if (variables?.entity_6?.templates?.length) {
58 | templates.push(...variables.entity_6.templates);
59 | }
60 | return templates;
61 | ]]]
62 | variables: "[[[ return variables?.entity_6; ]]]"
63 | state:
64 | - operator: "template"
65 | value: "[[[ return !variables.entity_6; ]]]"
66 | styles:
67 | card:
68 | - display: "none"
69 | entity: "[[[ return variables?.entity_6?.entity_id; ]]]"
70 |
--------------------------------------------------------------------------------
/lovelace/cards/quick_status_entities.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: Disconnected Devices
6 | custom_fields:
7 | buttons:
8 | card:
9 | type: vertical-stack
10 | cards:
11 | - type: conditional
12 | conditions:
13 | - entity: sensor.unavailable_entities
14 | state_not: Online
15 | card:
16 | type: custom:auto-entities
17 | card:
18 | type: entities
19 | filter:
20 | include:
21 | - group: group.monitored_entities
22 | state: unavailable
23 | - group: group.monitored_entities
24 | state: unknown
25 | - type: conditional
26 | conditions:
27 | - entity: sensor.unavailable_entities
28 | state: Online
29 | card:
30 | type: custom:button-card
31 | template: fridge
32 | icon: mdi:check-bold
33 | color: green
34 | name: Everything is ONLINE!
35 | tap_action:
36 | action: navigate
37 | navigation_path: sensors
38 | - type: custom:auto-entities
39 | show_empty: false
40 | card:
41 | type: entities
42 | title: Critical Battery Levels
43 | filter:
44 | include:
45 | - domain: sensor
46 | entity_id: "*_battery*"
47 | state: <=10
48 | exclude:
49 | - domain: sensor
50 | entity_id: "*_battery_power"
51 | - domain: sensor
52 | entity_id: "*_battery_temperature"
53 | - entity_id: sensor.ups_time_on_battery
54 | - entity_id: sensor.inbal_s10plus_battery_level
55 | - entity_id: sensor.inbal_zenfone9_battery_level
56 | - entity_id: sensor.house_tablet_battery_level
57 | - entity_id: sensor.black_tablet_battery_level
58 | sort:
59 | method: state
60 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/card_room_windows/card_room_windows.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | card_room_windows:
3 | template:
4 | - card_room
5 | - card_room_6_entities
6 | - blue_on
7 | tap_action:
8 | action: fire-dom-event
9 | browser_mod:
10 | service: browser_mod.sequence
11 | data:
12 | sequence:
13 | - service: browser_mod.navigate
14 | data:
15 | path: |
16 | [[[ return variables.card_room_windows_tap_action_navigation_path; ]]]
17 | - service: browser_mod.close_popup
18 |
19 | variables:
20 | label_use_temperature: false
21 | label_use_brightness: false
22 | card_room_windows_shutter_entity: ""
23 | card_room_windows_curtain_entity: ""
24 |
25 | entity_1:
26 | entity_id: |
27 | [[[ return variables.card_room_windows_shutter_entity; ]]]
28 | templates:
29 | - card_room_cover_up
30 | entity_2:
31 | entity_id: |
32 | [[[ return variables.card_room_windows_shutter_entity; ]]]
33 | templates:
34 | - card_room_cover_stop
35 | - card_room_windows_shutter_icon
36 | entity_3:
37 | entity_id: |
38 | [[[ return variables.card_room_windows_shutter_entity; ]]]
39 | templates:
40 | - card_room_cover_down
41 |
42 |
43 | entity_4:
44 | entity_id: |
45 | [[[ return variables.card_room_windows_curtain_entity; ]]]
46 | templates:
47 | - card_room_cover_up
48 | entity_5:
49 | entity_id: |
50 | [[[ return variables.card_room_windows_curtain_entity; ]]]
51 | templates:
52 | - card_room_cover_stop
53 | - card_room_windows_curtain_icon
54 | entity_6:
55 | entity_id: |
56 | [[[ return variables.card_room_windows_curtain_entity; ]]]
57 | templates:
58 | - card_room_cover_down
59 |
60 | card_room_windows_shutter_icon:
61 | state:
62 | - icon: mdi:window-shutter
63 | value: "closed"
64 | id: "closed"
65 |
66 | - icon: mdi:window-shutter-open
67 | value: "open"
68 | id: "open"
69 |
70 | card_room_windows_curtain_icon:
71 | state:
72 | - icon: mdi:curtains-closed
73 | value: "closed"
74 | id: "closed"
75 |
76 | - icon: mdi:curtains
77 | value: "open"
78 | id: "open"
79 |
80 |
--------------------------------------------------------------------------------
/lovelace/cards/control_screens.yaml:
--------------------------------------------------------------------------------
1 | #Devices
2 | # type: vertical-stack
3 | # cards:
4 | # - type: custom:button-card
5 | # template: title
6 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.devices ]]]"
7 | type: horizontal-stack
8 | cards:
9 | - type: conditional
10 | conditions:
11 | - entity: switch.house_tablet_screen
12 | state_not: "unavailable"
13 | card:
14 | type: custom:button-card
15 | template: tablet-button
16 | entity: switch.house_tablet_screen
17 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.mr_white ]]]"
18 | variables:
19 | tablet_id: house_tablet
20 | tablet_friendly_name: Mr. White
21 | triggers_update: input_number.house_tablet_volume
22 |
23 | - type: conditional
24 | conditions:
25 | - entity: switch.black_tablet_screen
26 | state_not: "unavailable"
27 | card:
28 | type: custom:button-card
29 | template: tablet-button
30 | entity: switch.black_tablet_screen
31 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.mr_black ]]]"
32 | variables:
33 | tablet_id: black_tablet
34 | tablet_friendly_name: Mr. Black
35 | triggers_update: input_number.black_tablet_volume
36 |
37 | - type: custom:button-card
38 | template: tv-button
39 | entity: media_player.balcony_tv
40 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.balcony ]]]"
41 |
42 | - type: custom:button-card
43 | template: tv-button
44 | entity: media_player.living_room_tv
45 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.living_room ]]]"
46 |
47 | - type: custom:button-card
48 | template: tv-button
49 | entity: media_player.bedroom_tv
50 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.bedroom ]]]"
51 |
--------------------------------------------------------------------------------
/lovelace/cards/control_ac_simple.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 |
4 | - type: custom:button-card
5 | template:
6 | - climate-button
7 | - climate_button_state_colors
8 | entity: climate.mainac
9 | name: "Central Air Conditioning"
10 | label: "On/Off"
11 | color: rgb(253, 216, 53)
12 | tap_action:
13 | action: call-service
14 | service: switch.toggle
15 | service_data:
16 | entity_id: switch.mainac
17 |
18 | state:
19 | - value: fan_only
20 | icon: mdi:fan
21 | - value: dry
22 | icon: mdi:water-percent
23 | - value: auto
24 | icon: mdi:autorenew
25 | - value: cool
26 | icon: mdi:snowflake
27 | - value: heat
28 | icon: mdi:weather-sunny
29 | - value: "off"
30 | id: "off"
31 | icon: mdi:power
32 |
33 |
34 | styles:
35 | card:
36 | - padding: 1% 0px
37 |
38 | - type: horizontal-stack
39 | cards:
40 | - type: "custom:button-card"
41 | color_type: blank-card
42 |
43 | - type: custom:button-card
44 | icon: mdi:cog
45 | size: 30px
46 | entity: switch.mainac
47 | show_name: false
48 | styles:
49 | card:
50 | - width: 50px
51 | - height: 37px
52 |
53 | tap_action:
54 | action: fire-dom-event
55 | browser_mod:
56 | service: browser_mod.popup
57 | data:
58 | content: !include /config/lovelace/cards/control_ac.yaml
59 |
60 | color: gray
61 | state:
62 | - value: 'on'
63 | id: 'on'
64 | color: gray
65 | - value: 'off'
66 | color: gray
67 |
68 | # - type: custom:button-card
69 | # template: ha-button
70 | # entity: switch.mainac
71 | # name: "Settings"
72 | # icon: mdi:cog
73 |
74 | # size: 20%
75 | # tap_action:
76 | # action: fire-dom-event
77 | # browser_mod:
78 | # service: browser_mod.popup
79 | # data:
80 | # content: !include /config/lovelace/cards/control_ac.yaml
81 |
82 | # color: gray
83 | # state:
84 | # - value: 'on'
85 | # id: 'on'
86 | # color: gray
87 | # - value: 'off'
88 | # id: 'off'
89 | # color: gray
90 |
91 |
--------------------------------------------------------------------------------
/packages/Devices/hue_remote_riley.yaml:
--------------------------------------------------------------------------------
1 | ## Button 1: Sleep
2 | ## Button 2: Bedroom Curtain
3 | ## Button 3: Bedroom Shutter
4 | ## Button 4: Black Tablet
5 |
6 | #com.mcu.reolink
7 |
8 | automation:
9 | - id: Hue Remote Riley Actions
10 | alias: Hue Remote Riley Actions
11 | mode: parallel
12 | trigger:
13 | - platform: state
14 | entity_id: sensor.riley_hue_remote_action
15 | not_to: ''
16 | variables:
17 | button_code: "{{ trigger.to_state.state }}"
18 | action:
19 | - alias: "choose button"
20 | choose:
21 | ## Button 1 Short Click: Turn On White Tablet
22 | - conditions: "{{ button_code == 'on_press' }}"
23 | sequence:
24 | - service: switch.turn_on
25 | entity_id: switch.house_tablet_screen
26 |
27 | - if:
28 | - condition: not
29 | conditions:
30 | - alias: "Foreground app isn't Reolink"
31 | condition: state
32 | entity_id: sensor.house_tablet_foreground_app
33 | state: "com.mcu.reolink"
34 | then:
35 | service: rest_command.house_tablet_run_reolink
36 |
37 | ## Button Short Click: Volume On
38 | - conditions: "{{ button_code == 'up_press' }}"
39 | sequence:
40 | - service: input_number.set_value
41 | target:
42 | entity_id:
43 | - input_number.house_tablet_volume
44 | - input_number.black_tablet_volume
45 | data:
46 | value: 5
47 |
48 | ## Button Short Click: Volume Off
49 | - conditions: "{{ button_code == 'down_press' }}"
50 | sequence:
51 | - service: input_number.set_value
52 | target:
53 | entity_id:
54 | - input_number.house_tablet_volume
55 | - input_number.black_tablet_volume
56 | data:
57 | value: 0
58 |
59 | ## Button 4 Short Click: Turn Off White Tablet
60 | - conditions: "{{ button_code == 'off_press' }}"
61 | sequence:
62 | - service: switch.turn_off
63 | entity_id: switch.house_tablet_screen
64 |
--------------------------------------------------------------------------------
/packages/Services/blink_light.yaml:
--------------------------------------------------------------------------------
1 | script:
2 | blink_light:
3 | alias: Blink Light
4 | mode: parallel
5 | variables:
6 | light_original_state: "{{ states(light_entity_id) }}"
7 | light_is_dimmable: "{{ 'brightness' in state_attr(light_entity_id, 'supported_color_modes') }}"
8 | sequence:
9 |
10 | - if:
11 | - alias: "Light isn't on"
12 | condition: template
13 | value_template: "{{ light_original_state != 'on' }}"
14 | - alias: "Light supports brightness"
15 | condition: template
16 | value_template: "{{ light_is_dimmable }}"
17 | then: #Turn on the light and wait 1 second to get its brightness
18 | - service: light.turn_on
19 | data:
20 | entity_id: "{{ light_entity_id }}"
21 | - delay:
22 | seconds: 1
23 |
24 | - alias: "Get the updated brightness value"
25 | variables:
26 | light_original_brigtness: "{{ state_attr(light_entity_id, 'brightness') }}"
27 |
28 | - if:
29 | - alias: "Light supports brightness"
30 | condition: template
31 | value_template: "{{ light_is_dimmable }}"
32 | then:
33 | - repeat:
34 | count: 10
35 | sequence:
36 | - service: light.turn_on
37 | data:
38 | entity_id: "{{ light_entity_id }}"
39 | brightness_pct: "{{ 100 if (state_attr(light_entity_id, 'brightness') | int(1) ) <= 50 else 1 }}"
40 | - delay:
41 | seconds: "{{ delay_seconds | default(1) }}"
42 |
43 | #Return to original brightness
44 | - service: light.turn_on
45 | data:
46 | entity_id: "{{ light_entity_id }}"
47 | brightness: "{{ light_original_brigtness }}"
48 |
49 | else: #Light doesn't support brighness
50 | - repeat:
51 | count: 10
52 | sequence:
53 | - service: light.toggle
54 | data:
55 | entity_id: "{{ light_entity_id }}"
56 | - delay:
57 | seconds: "{{ delay_seconds | default(1) }}"
58 |
59 |
60 | #Return to original state
61 | - service: "light.turn_{{ light_original_state }}"
62 | data:
63 | entity_id: "{{ light_entity_id }}"
64 |
65 |
--------------------------------------------------------------------------------
/lovelace/room_cards/living_room/devices.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: Devices
6 |
7 |
8 | - type: horizontal-stack
9 | cards:
10 | - type: conditional
11 | conditions:
12 | - entity: input_boolean.simple_smart_home_mode
13 | state: "off"
14 | card:
15 | type: custom:button-card
16 | template: climate-button
17 | entity: climate.ac_damper_living_room
18 | name: AC
19 | icon: mdi:sofa-outline
20 | triggers_update:
21 | - binary_sensor.balcony_window
22 | - binary_sensor.kitchen_window
23 | - sensor.living_room_temperature_monitor
24 | variables:
25 | window_entity_ids:
26 | - binary_sensor.balcony_window
27 | - binary_sensor.kitchen_window
28 | temperature_monitor_entity_id: sensor.living_room_temperature_monitor
29 | damper_name: ac_damper_living_room
30 |
31 | - type: custom:button-card
32 | template:
33 | - ha-button
34 | - fill_container
35 | entity: fan.living_room_fan
36 | name: "Fan"
37 | icon: mdi:ceiling-fan
38 |
39 | - type: conditional
40 | conditions:
41 | - entity: switch.house_tablet_screen
42 | state_not: "unavailable"
43 | card:
44 | type: custom:button-card
45 | template:
46 | - tablet-button
47 | entity: switch.house_tablet_screen
48 | variables:
49 | tablet_id: house_tablet
50 | tablet_friendly_name: Mr. White
51 | triggers_update: input_number.house_tablet_volume
52 | styles:
53 | card:
54 | - height: 115px
55 |
56 |
57 | - type: horizontal-stack
58 | cards:
59 |
60 | - type: custom:button-card
61 | template: tv-button
62 | entity: media_player.living_room_tv
63 | name: TV
64 |
65 | - type: custom:button-card
66 | template: ha-button
67 | entity: media_player.amplifier
68 | name: Amplifier
69 | icon: mdi:audio-input-stereo-minijack
70 |
71 | - type: custom:button-card
72 | template: ha-button
73 | entity: switch.subwoofer
74 | name: Subwoofer
75 | icon: mdi:speaker
76 |
77 |
--------------------------------------------------------------------------------
/lovelace/room_cards/guests/devices.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 |
4 | - type: custom:button-card
5 | template: title
6 | name: Devices
7 |
8 | - type: horizontal-stack
9 | cards:
10 | - type: conditional
11 | conditions:
12 | - entity: input_boolean.simple_smart_home_mode
13 | state: "off"
14 | card:
15 | type: custom:button-card
16 | template: climate-button
17 | entity: climate.ac_damper_guests
18 | name: "AC"
19 | icon: mdi:account-multiple
20 | variables:
21 | window_entity_ids: binary_sensor.guests_window
22 | temperature_monitor_entity_id: sensor.guests_temperature_monitor
23 | damper_name: ac_damper_guests
24 | triggers_update:
25 | - binary_sensor.guests_window
26 | - sensor.guests_temperature_monitor
27 | - timer.ac_damper_guests
28 |
29 | - type: conditional
30 | conditions:
31 | - entity: fan.guests_fan
32 | state_not: "unavailable"
33 | card:
34 | type: custom:button-card
35 | template: ha-button
36 | entity: fan.guests_fan
37 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.fan ]]]"
38 | icon: mdi:fan
39 | hold_action:
40 | action: fire-dom-event
41 | browser_mod:
42 | service: browser_mod.popup
43 | data:
44 | content:
45 | type: vertical-stack
46 | cards:
47 | - entity: fan.guests_fan
48 | name: Guests Fan
49 | type: custom:fan-xiaomi
50 | # platform: xiaomi_miio_fan
51 | - type: custom:button-card
52 | entity: script.reset_fan
53 | name: Reset Angle
54 | icon: mdi:angle-obtuse
55 | layout: icon_name
56 | styles:
57 | card:
58 | - height: 60px
59 | tap_action:
60 | action: call-service
61 | service: script.reset_fan
62 | service_data:
63 | entity_id: fan.guests_fan
--------------------------------------------------------------------------------
/packages/Automations/stairs.yaml:
--------------------------------------------------------------------------------
1 | group:
2 | stairs_light_automations:
3 | name: Stairs Light - On motion
4 | entities:
5 | - automation.stairs_light_auto_on
6 | - automation.stairs_light_auto_off
7 | - automation.stairs_light_off_when_front_door_is_open_for_30_mins
8 |
9 | automation:
10 | - alias: Stairs Light auto on
11 | id: Stairs Light auto on
12 | mode: single
13 | trigger: #Turn on when either door is opened or there is motion
14 | - platform: state
15 | entity_id:
16 | - binary_sensor.stairs_motion
17 | from: "off"
18 | to: "on"
19 | - platform: state
20 | entity_id:
21 | - binary_sensor.front_door
22 | from: "off"
23 | to: "on"
24 | for:
25 | seconds: 1.5
26 | action:
27 | - service: switch.turn_on
28 | entity_id: switch.stairs
29 |
30 | - alias: Stairs light auto off
31 | trigger:
32 | - platform: state
33 | entity_id:
34 | - binary_sensor.stairs_motion
35 | from: "on"
36 | to: "off"
37 |
38 | - platform: state
39 | entity_id:
40 | - binary_sensor.front_door
41 | from: "on"
42 | to: "off"
43 | for:
44 | minutes: 3
45 |
46 | condition: #Turn off only if both door is closed and there is no motion
47 | - condition: and
48 | conditions:
49 | - condition: state
50 | entity_id:
51 | - binary_sensor.front_door
52 | state:
53 | - 'off'
54 | - 'unavailable'
55 | for:
56 | minutes: 3
57 |
58 | - condition: state
59 | entity_id:
60 | - binary_sensor.stairs_motion
61 | state:
62 | - 'off'
63 | - 'unavailable'
64 | action:
65 | - service: switch.turn_off
66 | entity_id: switch.stairs_group
67 |
68 | - alias: Stairs light off when front door is open for 30 mins
69 | trigger:
70 | - platform: state
71 | entity_id: binary_sensor.front_door
72 | from: "off"
73 | to: "on"
74 | for:
75 | minutes: 30
76 | condition:
77 | condition: state
78 | entity_id: binary_sensor.stairs_motion
79 | state:
80 | - 'off'
81 | - 'unavailable'
82 | action:
83 | - service: switch.turn_off
84 | entity_id: switch.stairs_group
--------------------------------------------------------------------------------
/lovelace/cards/devices.yaml:
--------------------------------------------------------------------------------
1 | #Devices
2 | type: vertical-stack
3 | cards:
4 | - type: custom:button-card
5 | template: title
6 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.devices ]]]"
7 | - type: horizontal-stack
8 | cards:
9 | - type: conditional
10 | conditions:
11 | - entity: switch.house_tablet_screen
12 | state_not: "unavailable"
13 | card:
14 | type: custom:button-card
15 | template: tablet-button
16 | entity: switch.house_tablet_screen
17 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.mr_white ]]]"
18 | variables:
19 | tablet_id: house_tablet
20 | tablet_friendly_name: Mr. White
21 | triggers_update: input_number.house_tablet_volume
22 |
23 | - type: conditional
24 | conditions:
25 | - entity: switch.black_tablet_screen
26 | state_not: "unavailable"
27 | card:
28 | type: custom:button-card
29 | template: tablet-button
30 | entity: switch.black_tablet_screen
31 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.mr_black ]]]"
32 | variables:
33 | tablet_id: black_tablet
34 | tablet_friendly_name: Mr. Black
35 | triggers_update: input_number.black_tablet_volume
36 |
37 | - type: custom:button-card
38 | template: tv-button
39 | entity: media_player.balcony_tv
40 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.balcony ]]]"
41 |
42 | - type: custom:button-card
43 | template: tv-button
44 | entity: media_player.living_room_tv
45 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.living_room ]]]"
46 |
47 | - type: custom:button-card
48 | template: tv-button
49 | entity: media_player.bedroom_tv
50 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.bedroom ]]]"
51 |
--------------------------------------------------------------------------------
/lovelace/cards/quick_status_appliances.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.appliances ]]]"
6 | custom_fields:
7 | buttons:
8 | card:
9 | type: horizontal-stack
10 | cards:
11 | - type: custom:button-card
12 | template: fridge
13 | entity: binary_sensor.fridge
14 | size: 35px
15 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.fridge ]]]"
16 | - type: custom:button-card
17 | template: fridge
18 | entity: binary_sensor.freezer
19 | size: 35px
20 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.freezer ]]]"
21 | - type: custom:button-card
22 | template: fridge
23 | entity: binary_sensor.big_freezer
24 | size: 35px
25 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.big_freezer ]]]"
26 |
27 | # - type: custom:button-card
28 | # template: ha-button
29 | # entity: input_select.laundry_machine_status
30 | # size: 35px
31 | # styles:
32 | # label:
33 | # - font-size: 10px
34 | # show_label: true
35 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.laundry_machine ]]]"
36 | # state:
37 | # - value: 'Idle'
38 | # icon: mdi:washing-machine
39 | # color: green
40 |
41 | # - value: 'Running'
42 | # label: 'Running'
43 | # icon: mdi:washing-machine
44 | # color: orange
45 |
46 | # - value: 'Clean'
47 | # label: 'Clean'
48 | # icon: mdi:washing-machine-alert
49 | # color: red
50 | # styles:
51 | # icon:
52 | # - animation: blink 2s ease infinite
--------------------------------------------------------------------------------
/packages/Automations/power_consumption_partial_period.yaml:
--------------------------------------------------------------------------------
1 | input_text:
2 | energy_partial_period_start:
3 | name: Total Energy Partial Period Start
4 | energy_partial_period_end:
5 | name: Total Energy Partial Period End
6 |
7 | counter:
8 | partial_bill_days:
9 | name: Partial Bill Days Count
10 | initial: 0
11 | step: 1
12 |
13 | sensor:
14 | - platform: template
15 | sensors:
16 | energy_total_partial_bill:
17 | friendly_name: "Total Energy Partial Bill"
18 | value_template: "{{ (states('input_text.energy_partial_period_end') | float) - (states('input_text.energy_partial_period_start') | float) }}"
19 | unit_of_measurement: "kWh"
20 |
21 | - platform: template
22 | sensors:
23 | energy_total_partial_bill_cost:
24 | friendly_name: "Partial Bill Cost"
25 | value_template: "{{ ((states('sensor.energy_total_partial_bill') | float) * (states('input_text.power_nis_per_kwh') | float) + (states('input_text.power_monthly_additional_cost')|int / 60 * states('counter.partial_bill_days')|int ) ) |round(1) }}"
26 | unit_of_measurement: "NIS"
27 |
28 |
29 | automation:
30 | - alias: Energy count partial bill
31 | trigger:
32 | - platform: time
33 | at: "00:00:00"
34 | action:
35 | - service: input_text.set_value
36 | data:
37 | entity_id: input_text.energy_partial_period_end
38 | value: "{{ states('sensor.energy_total') }}"
39 | - service: counter.increment
40 | target:
41 | entity_id: counter.partial_bill_days
42 |
43 | switch:
44 | - platform: template
45 | switches:
46 | count_partial_bill:
47 | unique_id: "Count Partial Bill"
48 | friendly_name: "Count Partial Bill"
49 | value_template: "{{ is_state('automation.energy_count_partial_bill', 'on') }}"
50 | turn_on:
51 | - service: input_text.set_value
52 | data:
53 | entity_id:
54 | - input_text.energy_partial_period_start
55 | - input_text.energy_partial_period_end
56 | value: "{{ states('sensor.energy_total') }}"
57 | - service: counter.reset
58 | target:
59 | entity_id: counter.partial_bill_days
60 | - service: automation.turn_on
61 | target:
62 | entity_id: automation.energy_count_partial_bill
63 |
64 | turn_off:
65 | - service: automation.turn_off
66 | target:
67 | entity_id: automation.energy_count_partial_bill
--------------------------------------------------------------------------------
/lovelace/room_cards/toilet/sensors.yaml:
--------------------------------------------------------------------------------
1 | # type: vertical-stack
2 | # cards:
3 | # - type: custom:button-card
4 | # template: title
5 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.smart_home_status ]]]"
6 |
7 | # - type: horizontal-stack
8 | # cards:
9 | # - type: custom:button-card
10 | # template: ha-button
11 | # entity: binary_sensor.toilet_presence
12 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.occupied ]]]"
13 | # icon: mdi:account-outline
14 | # state:
15 | # - value: 'on'
16 | # id: 'on'
17 | # color: rgb(253, 216, 53)
18 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.occupied ]]]"
19 | # icon: mdi:account
20 | # - value: 'off'
21 | # id: 'off'
22 | # color: rgb(68, 115, 158)
23 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.vacant ]]]"
24 | # icon: mdi:account-outline
25 | # - value: 'unavailable'
26 | # color: lightgray
27 | # name: "Unknown"
28 |
29 | # - type: custom:button-card
30 | # template: ha-button
31 | # entity: binary_sensor.toilet_door
32 | # icon: mdi:door-open
33 | # state:
34 | # - value: 'on'
35 | # id: 'on'
36 | # color: rgb(253, 216, 53)
37 | # name: "Open"
38 | # icon: mdi:door-open
39 | # - value: 'off'
40 | # id: 'off'
41 | # color: rgb(68, 115, 158)
42 | # name: "Closed"
43 | # icon: mdi:door-closed
44 | # - value: 'unavailable'
45 | # color: lightgray
46 | # name: "Unknown"
47 |
48 | type: custom:mushroom-chips-card
49 | alignment: center
50 | chips:
51 |
52 | - type: template
53 | icon: '{{ ''mdi:account'' if states(entity) == ''on'' else ''mdi:account-outline''}}'
54 | icon_color: '{{ ''red'' if states(entity) == ''on''}}'
55 | content: '{{ ''Occupied'' if states(entity) == ''on'' else ''Vacant''}}'
56 |
57 | entity: binary_sensor.toilet_presence
58 |
59 | - type: entity
60 | entity: binary_sensor.toilet_door
61 | content_info: name
62 | name: Door
63 | icon_color: green
64 |
65 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/cover_buttons/cover_buttons.yaml:
--------------------------------------------------------------------------------
1 | cover-up:
2 | hold_action:
3 | action: more-info
4 | show_name: false
5 | icon: mdi:arrow-up
6 | styles:
7 | card:
8 | - height: 30px
9 | - border-radius: 10px 10px 0px 0px
10 | - padding: 2%
11 | state:
12 | - value: opening
13 | color: rgb(253, 216, 53)
14 | tap_action:
15 | action: call-service
16 | service: cover.open_cover
17 | service_data:
18 | entity_id: |
19 | [[[ return entity.entity_id; ]]]
20 |
21 | cover-stop:
22 | variables:
23 | var_name: window_entity_ids
24 | hold_action:
25 | action: more-info
26 | icon: mdi:square
27 | show_name: false
28 | styles:
29 | card:
30 | - height: 30px
31 | - border-radius: 0px
32 | - padding: 2%
33 | custom_fields:
34 | window_open:
35 | - position: absolute
36 | - left: 70%
37 | - top: 10%
38 | - height: 20px
39 | - width: 20px
40 | - visibility: |
41 | [[[
42 | if (variables.window_entity_ids != null) {
43 | if (Array.isArray(variables.window_entity_ids)) {
44 | for (const entity of variables.window_entity_ids) {
45 | if (states[entity].state == "on") return "visible";
46 | }
47 | } else {
48 | if (states[variables.window_entity_ids].state == "on") return "visible";
49 | }
50 | }
51 |
52 | return "hidden";
53 | ]]]
54 | custom_fields:
55 | window_open: >
56 | [[[ return ''; ]]]
58 | state:
59 | - value: open
60 | color: rgb(253, 216, 53)
61 | - value: closed
62 | color: rgb(68, 115, 158)
63 | - value: closing
64 | icon: mdi:stop
65 | - value: opening
66 | icon: mdi:stop
67 | tap_action:
68 | action: call-service
69 | service: cover.stop_cover
70 | service_data:
71 | entity_id: |
72 | [[[ return entity.entity_id; ]]]
73 |
74 | cover-down:
75 | hold_action:
76 | action: more-info
77 | show_name: false
78 | icon: mdi:arrow-down
79 | styles:
80 | card:
81 | - height: 30px
82 | - border-radius: 0px 0px 10px 10px
83 | - padding: 2%
84 | state:
85 | - value: closing
86 | color: rgb(253, 216, 53)
87 | tap_action:
88 | action: call-service
89 | service: cover.close_cover
90 | service_data:
91 | entity_id: |
92 | [[[ return entity.entity_id; ]]]
93 |
--------------------------------------------------------------------------------
/packages/Automations/toilet.yaml:
--------------------------------------------------------------------------------
1 | binary_sensor:
2 | - platform: group
3 | name: "Toilet Occupancy"
4 | unique_id: "Toilet Occupancy"
5 | device_class: occupancy
6 | entities:
7 | - binary_sensor.toilet_motion
8 | - binary_sensor.toilet_presence
9 |
10 | automation:
11 |
12 | - alias: Toilet Light - On motion
13 | id: Toilet Light - On motion
14 | mode: single
15 | trigger:
16 |
17 | - id: 'on_door'
18 | platform: state
19 | entity_id:
20 | - binary_sensor.toilet_door
21 | from: 'off'
22 | to: 'on'
23 |
24 | - id: 'on_occupancy'
25 | platform: state
26 | entity_id:
27 | - binary_sensor.toilet_occupancy
28 | from: 'off'
29 | to: 'on'
30 |
31 | - id: 'off'
32 | platform: state
33 | entity_id: binary_sensor.toilet_occupancy
34 | from: 'on'
35 | to: 'off'
36 |
37 | condition:
38 | - alias: "If the door was opened and someone was inside, don't turn the light on"
39 | condition: template
40 | value_template: "{{ 'false' if trigger.id == 'on_door' and is_state('binary_sensor.toilet_occupancy', 'on') else 'true' }}"
41 |
42 | action:
43 | - service: light.turn_{{ trigger.id | replace('_door', '') | replace('_occupancy', '') }}
44 | entity_id: light.toilet_lights
45 |
46 | - alias: Toilet vent - When pooping
47 | id: Toilet vent
48 | mode: restart
49 | trigger:
50 | - platform: state
51 | entity_id: binary_sensor.toilet_occupancy
52 | from: 'off'
53 | to: 'on'
54 | id: "on"
55 | for:
56 | minutes: 5
57 |
58 | - platform: state
59 | entity_id: switch.toilet_vent
60 | to: 'on'
61 | for:
62 | minutes: 8
63 | id: "off"
64 |
65 | action:
66 | #Wait for them to leave the toilet
67 | - if:
68 | condition: template
69 | value_template: "{{ trigger.id == 'on' }}"
70 | then:
71 | - wait_for_trigger:
72 | - platform: state
73 | entity_id: binary_sensor.toilet_occupancy
74 | from: "on"
75 | to: "off"
76 |
77 | #Make it smell better
78 | - service: "switch.turn_{{ trigger.id }}"
79 | entity_id: switch.toilet_vent
80 |
81 | switch:
82 |
83 | - platform: broadlink
84 | mac: !secret office_mac
85 | switches:
86 | - name: Toilet Night Light
87 | command_on: 'siAyAAcQEQUGEBEFEQUGEBEFBxAGEBEFEQURBQYQBxAHEBEFBhARBQcPBw8RBQaiEQURBQYQAAAAAAAA'
88 | command_off: 'siQyABEFEQUGEAcQEQUGEBEFEQUGEBEFBxAGEBEFEQURBQYQBxAGDxEFBhAGEAYQBxARBQeiAAAAAAAA'
89 |
--------------------------------------------------------------------------------
/lovelace/room_cards/office/lights.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.lights ]]]"
6 |
7 | - type: horizontal-stack
8 | cards:
9 |
10 | # - type: custom:button-card
11 | # template: ha-button
12 | # entity: light.office_main
13 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.main ]]]"
14 | # icon: mdi:lightbulb-outline
15 |
16 | # - type: custom:button-card
17 | # template: ha-button
18 | # entity: light.office_bff_light
19 | # name: "BFF"
20 | # icon: mdi:alpha-b
21 |
22 | - type: "custom:button-card"
23 | template:
24 | - custom_card_light
25 | - fill_container
26 | entity: light.office_main
27 | variables:
28 | ulm_card_light_name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.main ]]]"
29 | ulm_card_light_force_background_color: true
30 | ulm_card_light_icon: mdi:lightbulb-outline
31 |
32 | - type: "custom:button-card"
33 | template:
34 | - custom_card_light
35 | - fill_container
36 | entity: light.office_bff_light
37 | variables:
38 | ulm_card_light_enable_slider: false
39 | ulm_card_light_force_background_color: true
40 | ulm_card_light_name: "BFF"
41 | ulm_card_light_icon: mdi:alpha-b
42 |
43 | - type: horizontal-stack
44 | cards:
45 |
46 | - type: "custom:button-card"
47 | template:
48 | - custom_card_light
49 | - fill_container
50 | entity: light.office_meeting_light_1
51 | variables:
52 | ulm_card_light_enable_slider: true
53 | ulm_card_light_force_background_color: true
54 | ulm_card_light_enable_collapse: true
55 | ulm_card_light_name: "Meeting Light 1"
56 | ulm_card_light_icon: mdi:message-video
57 |
58 | - type: "custom:button-card"
59 | template:
60 | - custom_card_light
61 | - fill_container
62 | entity: light.office_meeting_light_2
63 | variables:
64 | ulm_card_light_enable_slider: true
65 | ulm_card_light_force_background_color: true
66 | ulm_card_light_enable_collapse: true
67 | ulm_card_light_name: "Meeting Light 2"
68 | ulm_card_light_icon: mdi:message-video
--------------------------------------------------------------------------------
/lovelace/room_cards/kitchen/lights.yaml:
--------------------------------------------------------------------------------
1 | # type: vertical-stack
2 | # cards:
3 |
4 | # - type: conditional
5 | # conditions:
6 | # - entity: light.kitchen_dimmable_lights
7 | # state: "on"
8 | # card:
9 | # type: custom:slider-entity-row
10 | # entity: light.kitchen_dimmable_lights
11 | # full_row: true
12 | # min: 1
13 | # max: 100
14 | # step: 5
15 |
16 |
17 | # - type: horizontal-stack
18 | # cards:
19 | # - type: custom:button-card
20 | # template: ha-button
21 | # entity: light.kitchen_island
22 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.kitchen_island ]]]"
23 | # icon: mdi:cube-outline
24 | # icon_height: 50px
25 |
26 | # - type: custom:button-card
27 | # template: ha-button
28 | # entity: light.kitchen_pantry
29 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.kitchen_pantry ]]]"
30 | # icon: mdi:fridge-outline
31 | # icon_height: 50px
32 |
33 | # - type: custom:button-card
34 | # template: ha-button
35 | # entity: light.kitchen_counter
36 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.kitchen_counter ]]]"
37 | # icon: mdi:countertop-outline
38 | # icon_height: 50px
39 |
40 | type: custom:layout-card
41 | layout_type: custom:grid-layout
42 | layout:
43 | grid-template-columns: repeat(3, 1fr)
44 | grid-auto-flow: row
45 | grid-gap: 0px
46 | margin: 0px
47 |
48 | mediaquery:
49 | "(max-width: 600px)":
50 | grid-template-columns: repeat(2, 1fr)
51 | cards:
52 |
53 | - type: "custom:button-card"
54 | template:
55 | - custom_card_light
56 | - fill_container
57 | entity: light.kitchen_island
58 | variables:
59 | ulm_card_light_enable_slider: true
60 | ulm_card_light_enable_collapse: true
61 | ulm_card_light_name: "Island"
62 | ulm_card_light_icon: mdi:cube-outline
63 |
64 | - type: "custom:button-card"
65 | template:
66 | - custom_card_light
67 | - fill_container
68 | entity: light.kitchen_pantry
69 | variables:
70 | ulm_card_light_name: "Pantry"
71 | ulm_card_light_icon: mdi:fridge-outline
72 |
73 | - type: "custom:button-card"
74 | template:
75 | - custom_card_light
76 | - fill_container
77 | entity: light.kitchen_counter
78 | variables:
79 | ulm_card_light_name: "Counter"
80 | ulm_card_light_icon: mdi:countertop-outline
81 |
--------------------------------------------------------------------------------
/packages/Devices/windows_group.yaml:
--------------------------------------------------------------------------------
1 | group:
2 | windows:
3 | name: Windows
4 | entities:
5 | - binary_sensor.balcony_window
6 | - binary_sensor.kitchen_window
7 | - binary_sensor.office_window
8 | - binary_sensor.guests_window
9 | - binary_sensor.bathroom_window
10 | - binary_sensor.riley_window
11 | - binary_sensor.bedroom_window
12 |
13 | shutters:
14 | name: Shutters
15 | entities:
16 | - cover.living_room_shutter
17 | - cover.kitchen_shutter
18 | - cover.office_shutter
19 | - cover.guests_shutter
20 | - cover.bedroom_shutter
21 |
22 | cover:
23 | - platform: group
24 | name: Curtains
25 | entities:
26 | - cover.living_room_curtain
27 | - cover.kitchen_curtain
28 | - cover.office_curtain
29 |
30 | script:
31 | all_shutters:
32 | alias: "All Shutters"
33 | variables:
34 | service_to_call: >-
35 | {% if service %}
36 | {{ service }}
37 | {% elif states('group.shutters') == 'open' %}
38 | cover.close_cover
39 | {% else %}
40 | cover.open_cover
41 | {% endif %}
42 | sequence:
43 | - service: "{{ service_to_call }}"
44 | entity_id: cover.kitchen_shutter
45 | - delay: "00:00:01"
46 | - service: "{{ service_to_call }}"
47 | entity_id: cover.office_shutter
48 | - delay: "00:00:01"
49 | - service: "{{ service_to_call }}"
50 | entity_id: cover.guests_shutter
51 | - delay: "00:00:01"
52 | - service: "{{ service_to_call }}"
53 | entity_id: cover.bedroom_shutter
54 | - delay: "00:00:{{ living_room_shutter_delay if living_room_shutter_delay else '01' }}" #Custom delay for living_room_shutter
55 | - service: "{{ service_to_call }}"
56 | entity_id: cover.living_room_shutter
57 | # automation:
58 | # - alias: Shutter Update Position From Physical Switch
59 | # mode: parallel
60 | # trigger:
61 | # - platform: state
62 | # entity_id:
63 | # - sensor.living_room_shutter_state
64 | # - sensor.kitchen_shutter_state
65 | # - sensor.kitchen_curtain_state
66 | # - sensor.office_shutter_state
67 | # - sensor.guests_shutter_state
68 | # - sensor.bedroom_shutter_state
69 | # variables:
70 | # cover_entity_id: "cover.{{ trigger.to_state.entity_id | replace('sensor.', '') | replace('_state', '') }}"
71 | # condition:
72 | # - condition: template
73 | # value_template: "{{ states(cover_entity_id) != 'opening' and states(cover_entity_id) != 'closing' }}"
74 | # action:
75 | # service: cover_rf_time_based.set_known_action
76 | # data:
77 | # entity_id: '{{ cover_entity_id }}'
78 | # action: '{{ trigger.to_state.state }}'
79 |
--------------------------------------------------------------------------------
/lovelace/views/smart_home_config.yaml:
--------------------------------------------------------------------------------
1 | title: Smart Home Configuration
2 | path: smart_home_config
3 | panel: false
4 | icon: mdi:cog
5 | badges: []
6 | cards:
7 |
8 | - type: vertical-stack
9 | cards:
10 | - type: custom:button-card
11 | template: title
12 | name: Notifications
13 |
14 | - type: custom:auto-entities
15 | card:
16 | type: grid
17 | square: false
18 | columns: 2
19 | card_param: cards
20 | sort:
21 | method: name
22 | filter:
23 | include:
24 | - label: "Config-Notifications"
25 | options:
26 | type: custom:button-card
27 | entity_id: this.entity_id
28 | template: config_button
29 | - entity_id: group.all_fridge_automations
30 | options:
31 | type: custom:button-card
32 | entity_id: this.entity_id
33 | template: config_button
34 | icon: mdi:fridge-outline
35 |
36 | - type: vertical-stack
37 | cards:
38 | - type: custom:button-card
39 | template: title
40 | name: Automatic Turn On/Off
41 |
42 | - type: custom:auto-entities
43 | card:
44 | type: grid
45 | square: false
46 | columns: 2
47 | card_param: cards
48 | sort:
49 | method: name
50 | filter:
51 | include:
52 | - label: "Config-TurnOnOff"
53 | options:
54 | type: custom:button-card
55 | entity_id: this.entity_id
56 | template: config_button
57 | - entity_id: group.stairs_light_automations
58 | options:
59 | type: custom:button-card
60 | entity_id: this.entity_id
61 | template: config_button
62 | icon: mdi:stairs
63 |
64 | - type: vertical-stack
65 | cards:
66 | - type: custom:button-card
67 | template: title
68 | name: Guests
69 |
70 | - type: custom:auto-entities
71 | card:
72 | type: grid
73 | square: false
74 | columns: 2
75 | card_param: cards
76 | sort:
77 | method: name
78 | filter:
79 | include:
80 | - label: "Config-Guests"
81 | options: &card
82 | type: custom:button-card
83 | entity_id: this.entity_id
84 | template: config_button
85 | - entity_id: group.guest_mode_automations
86 | options:
87 | type: custom:button-card
88 | entity_id: this.entity_id
89 | template: config_button
90 | icon: mdi:account-outline
91 |
--------------------------------------------------------------------------------
/lovelace/cards/quick_status_cameras.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: container
5 | name: Cameras
6 | custom_fields:
7 | buttons:
8 | card:
9 | type: vertical-stack
10 | cards:
11 | - type: horizontal-stack
12 | cards:
13 | - type: custom:button-card
14 | template: camera-status
15 | entity: device_tracker.ubnt_device_camera_livingroom
16 | name: Living Room
17 | variables:
18 | navigation_path: /lovelace-mobile/living-room
19 |
20 | - type: custom:button-card
21 | template: camera-status
22 | entity: device_tracker.ubnt_device_camera_balcony
23 | name: Balcony
24 | variables:
25 | navigation_path: /lovelace-mobile/balcony
26 |
27 | - type: custom:button-card
28 | template: camera-status
29 | entity: device_tracker.ubnt_device_camera_frontdoor
30 | name: Front Door
31 | variables:
32 | navigation_path: /lovelace-mobile/living-room#front_door
33 |
34 | # - type: custom:button-card
35 | # template: camera-view
36 | # entity: device_tracker.ubnt_device_camera_hallway
37 | # variables:
38 | # stream: camera.hallway
39 | # name: Hallway
40 |
41 | - type: horizontal-stack
42 | cards:
43 | - type: custom:button-card
44 | template: camera-status
45 | entity: device_tracker.ubnt_device_camera_office
46 | name: Office
47 | variables:
48 | navigation_path: /lovelace-mobile/office
49 |
50 | - type: custom:button-card
51 | template: camera-status
52 | entity: device_tracker.ubnt_device_camera_guests
53 | name: Guests
54 | variables:
55 | navigation_path: /lovelace-mobile/guests
56 |
57 | - type: custom:button-card
58 | template: camera-status
59 | entity: device_tracker.ubnt_device_camera_riley
60 | name: Riley
61 | variables:
62 | navigation_path: /lovelace-mobile/riley
63 |
64 | # - type: custom:button-card
65 | # template: camera-view
66 | # entity: device_tracker.ubnt_device_camera_bedroom
67 | # variables:
68 | # stream: camera.bedroom
69 | # name: Bedroom
70 |
--------------------------------------------------------------------------------
/lovelace/room_cards/living_room/window.yaml:
--------------------------------------------------------------------------------
1 | type: horizontal-stack
2 | cards:
3 |
4 | - type: vertical-stack
5 | cards:
6 | - type: custom:button-card
7 | template: title
8 | name: Living Room
9 |
10 | - type: horizontal-stack
11 | cards:
12 | - type: vertical-stack
13 | cards:
14 | - type: custom:button-card
15 | template: cover-up
16 | entity: cover.living_room_shutter
17 | - type: custom:button-card
18 | template: cover-stop
19 | entity: cover.living_room_shutter
20 | icon: mdi:window-shutter
21 | variables:
22 | window_entity_ids: binary_sensor.balcony_window
23 | triggers_update: binary_sensor.balcony_window
24 | - type: custom:button-card
25 | template: cover-down
26 | entity: cover.living_room_shutter
27 |
28 | - type: vertical-stack
29 | cards:
30 | - type: custom:button-card
31 | template: cover-up
32 | entity: cover.living_room_curtain
33 | - type: custom:button-card
34 | template: cover-stop
35 | entity: cover.living_room_curtain
36 | icon: mdi:curtains
37 | - type: custom:button-card
38 | template: cover-down
39 | entity: cover.living_room_curtain
40 |
41 |
42 | - type: vertical-stack
43 | cards:
44 | - type: custom:button-card
45 | template: title
46 | name: Kitchen
47 |
48 | - type: horizontal-stack
49 | cards:
50 | - type: vertical-stack
51 | cards:
52 | - type: custom:button-card
53 | template: cover-up
54 | entity: cover.kitchen_shutter
55 | - type: custom:button-card
56 | template: cover-stop
57 | entity: cover.kitchen_shutter
58 | icon: mdi:window-shutter
59 | variables:
60 | window_entity_ids: binary_sensor.kitchen_window
61 | triggers_update: binary_sensor.kitchen_window
62 | - type: custom:button-card
63 | template: cover-down
64 | entity: cover.kitchen_shutter
65 |
66 | - type: vertical-stack
67 | cards:
68 | - type: custom:button-card
69 | template: cover-up
70 | entity: cover.kitchen_curtain
71 | - type: custom:button-card
72 | template: cover-stop
73 | entity: cover.kitchen_curtain
74 | icon: mdi:blinds
75 | - type: custom:button-card
76 | template: cover-down
77 | entity: cover.kitchen_curtain
--------------------------------------------------------------------------------
/lovelace/views/05_googlespeakers.yaml:
--------------------------------------------------------------------------------
1 | icon: mdi:speaker-multiple
2 | path: googlespeakers
3 | title: GoogleSpeakers
4 | visible:
5 | - user: 9ccaeb57363d4902b296eb297da459e3
6 | - user: 441ffac368ed4f50911212c0816b227a
7 | - user: aa6d3713da1a4e1eac92dd176a3ae708
8 | - user: 954f920b6d6b4dd795e5ea5ab3f225d5
9 | badges: []
10 | cards:
11 | - type: custom:button-card
12 | template: back-button
13 |
14 | # - type: entities
15 | # entities:
16 | # - type: custom:mini-media-player
17 | # entity: media_player.everywhere
18 | # group: true
19 | # source: icon
20 | # info: short
21 | # hide:
22 | # volume: true
23 | # power: true
24 | # progress: true
25 | # info: true
26 | - type: custom:mini-media-player
27 | entity: media_player.amplifier
28 | group: true
29 | hide:
30 | controls: true
31 | soruce: true
32 | progress: true
33 | info: true
34 | source: true
35 | # - type: custom:mini-media-player
36 | # entity: media_player.living_room_speaker
37 | # group: true
38 | # name: Living Room
39 | # hide:
40 | # controls: true
41 | # power: true
42 | # progress: true
43 | # info: true
44 | # - type: custom:mini-media-player
45 | # entity: media_player.office_speaker
46 | # group: true
47 | # name: Office
48 | # hide:
49 | # controls: true
50 | # power: true
51 | # progress: true
52 | # info: true
53 | # - type: custom:mini-media-player
54 | # entity: media_player.bathroom_speaker
55 | # group: true
56 | # name: Bathroom
57 | # hide:
58 | # controls: true
59 | # power: true
60 | # progress: true
61 | # info: true
62 | # - type: custom:mini-media-player
63 | # entity: media_player.bedroom_speaker
64 | # group: true
65 | # name: Bedroom
66 | # hide:
67 | # controls: true
68 | # power: true
69 | # progress: true
70 | # info: true
71 | - type: custom:auto-entities
72 | show_empty: false
73 | card:
74 | type: entities
75 | filter:
76 | include:
77 | - domain: media_player
78 | state: playing
79 | sort:
80 | method: none
81 | - entities:
82 | - entity: switch.subwoofer
83 | icon: mdi:speaker
84 | show_header_toggle: false
85 | title: Audio
86 | type: entities
87 | - type: custom:spotify-card
88 | limit: 20
89 | playlist_type: default
90 | account: default
91 | default_device: Amplifier
92 | spotify_entity: media_player.spotify_shlomi_green
93 | filter_devices:
94 | - Announcements
95 | - Google TV
96 | - CC Audio
97 | - Android
98 | name: BFF Jukebox
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Welcome to shlomki's Home Assistant Config!
2 |
3 | Hi! My name is Shlomi, after spending quite some time with Home Assistant I decided it would be nice to share some of my nice automations and ideas with you, so I've uploaded my HA configuration here.
4 | Feel free to browse.
5 |
6 | # Disclaimer
7 | This code was written for my own personal needs, most of it was customized in ways which might not fit your own needs and might not work for you as it does for me. However, you can still use it as a good starting point and build on top of it. Use at your own risk. Good luck!
8 |
9 | # Screenshots
10 |
11 | ## Tablet
12 | A dashboard for quick control of lights, AC and other devices, in all areas of the house. The idea is to allow the control of many types of devices with just one tap.
13 |
14 | 
15 |
16 | ## Mobile:
17 | Designed to be more minimalistic, and provide access to different devices around the house grouped by device type, rather than by room.
18 |
19 | 
20 | 
21 | 
22 | 
23 | 
24 | 
25 | 
26 | 
27 |
28 | # Directory Structure
29 |
30 | ## / Root Directory
31 |
32 | This is the base directory for the configuration. The files are:
33 |
34 | - **lovelace** - All of my UI.
35 | - **packages** - This is where most of the logic is stored, you should definitely look at this folder.
36 | - **python_scripts** - A few helper scripts I've written that I use in my automations regularly. These scripts do slightly more complicated logic that's too much for yaml to handle.
37 | - **ui_lovelace_minimalist/custom_cards** - Some of my own button-card templates, and some customizations on top of UI Lovelace Minimalist.
38 |
39 | ## /packages Directory - The good stuff!
40 |
41 | - **Automations** - Anything that happens by itself, automagically.
42 | - **Climate** - Configurations regarding HVAC units, fans.
43 | - **Devices** - Other devices such as Cameras, Broadlink controllers, Shelly relays, TVs, etc.
44 | - **Lights** - Anything regarding the lights around the house.
45 | - **Services** - External services and helpers such as telegram, Google Maps, etc.
46 |
--------------------------------------------------------------------------------
/packages/Devices/hue_remote_office.yaml:
--------------------------------------------------------------------------------
1 | ## Button 1: Main Light
2 | ## Button 2: BFF Light
3 | ## Button 3: Fan
4 | ## Button 4: AC
5 |
6 | automation:
7 | - id: Office Hue Remote Actions
8 | alias: Office Hue Remote Actions
9 | mode: parallel
10 | trigger:
11 | - platform: state
12 | entity_id: sensor.office_hue_remote_action
13 | not_to: ''
14 | variables:
15 | button_code: "{{ trigger.to_state.state }}"
16 | action:
17 | - alias: "choose button"
18 | choose:
19 | ## Button 1 Release Press: Main Light Toggle
20 | - conditions: "{{ button_code == 'on_press_release' }}"
21 | sequence:
22 | - service: light.toggle
23 | target:
24 | entity_id: light.office_main
25 |
26 |
27 | ## Button 2 Release Press: BFF Light Toggle
28 | - conditions: "{{ button_code == 'up_press_release' }}"
29 | sequence:
30 | - service: light.toggle
31 | target:
32 | entity_id: light.office_bff_light
33 |
34 | ## Button 3 Release Press: Fan Toggle
35 | - conditions: "{{ button_code == 'down_press_release' }}"
36 | sequence:
37 | - service: fan.toggle
38 | entity_id: fan.office_fan
39 |
40 | ## Button 3 Hold: Increase Speed
41 | - conditions: "{{ button_code == 'down_hold' and is_state('fan.office_fan', 'on') }}"
42 | sequence:
43 | - service: fan.set_percentage
44 | data:
45 | entity_id: fan.office_fan
46 | percentage: >-
47 | {% set step = state_attr('fan.office_fan', 'percentage_step') %}
48 | {% set current = state_attr('fan.office_fan', 'percentage') %}
49 | {{ step if (current + step > 101) else (current + step) }}
50 |
51 | ## Button 4 Release Press: Office AC Toggle
52 | - conditions: "{{ button_code == 'off_press_release' }}"
53 | sequence:
54 | - service: "climate.turn_{{ 'on' if is_state('climate.ac_damper_office', 'off') else 'off' }}"
55 | target:
56 | entity_id: climate.ac_damper_office
57 |
58 | ## Button 4 Release Hold: Toggle multiple dampers
59 | - conditions: "{{ button_code == 'off_hold_release' and is_state('group.dampers', 'on') }}"
60 | sequence:
61 | - service: homeassistant.turn_off
62 | target:
63 | entity_id: group.dampers
64 |
65 | - conditions: "{{ button_code == 'off_hold_release' and is_state('group.dampers', 'off') }}"
66 | sequence:
67 | - service: "climate.turn_on"
68 | target:
69 | entity_id:
70 | - climate.ac_damper_living_room
71 | - climate.ac_damper_office
72 | - climate.ac_damper_guests
--------------------------------------------------------------------------------
/packages/Devices/hue_remote_bedroom_inbal.yaml:
--------------------------------------------------------------------------------
1 | ## Button 1: Sleep
2 | ## Button 2: Fan
3 | ## Button 3: Shutter
4 | ## Button 4: Black Tablet
5 |
6 | automation:
7 | - id: Bedroom Hue Remote Inbal Actions
8 | alias: Bedroom Hue Remote Inbal Actions
9 | mode: parallel
10 | trigger:
11 | - platform: state
12 | entity_id: sensor.inbal_hue_remote_action
13 | not_to: ''
14 | variables:
15 | button_code: "{{ trigger.to_state.state }}"
16 | action:
17 | - alias: "choose button"
18 | choose:
19 | ## Button 1 Release Hold: Sleep
20 | - conditions: "{{ button_code == 'on_hold' }}"
21 | sequence:
22 | - service: switch.turn_on
23 | target:
24 | entity_id: switch.sleep_scene
25 |
26 | ## Button 2 Release Short Press While Fan is Off: Turn On Fan
27 | - conditions: "{{ button_code == 'up_press_release' and is_state('fan.bedroom_fan', 'off') }}"
28 | sequence:
29 | - service: fan.turn_on
30 | entity_id: fan.bedroom_fan
31 |
32 | ## Button 2 Release Short Press While Fan is On: Cycle Fan Speed
33 | - conditions: "{{ button_code == 'up_press_release' and is_state('fan.bedroom_fan', 'on') }}"
34 | sequence:
35 | - service: fan.set_percentage
36 | data:
37 | entity_id: fan.bedroom_fan
38 | percentage: >-
39 | {% set step = state_attr('fan.bedroom_fan', 'percentage_step') %}
40 | {% set current = state_attr('fan.bedroom_fan', 'percentage') %}
41 | {{ step if (current + step > 100) else (current + step) }}
42 |
43 | ## Button 2 Hold: Turn Off Fan
44 | - conditions: "{{ button_code == 'up_hold' }}"
45 | sequence:
46 | - service: fan.turn_off
47 | entity_id: fan.bedroom_fan
48 |
49 | ## Button 3 Release Short Press When in Motion: Stop Bedroom Shutter
50 | - conditions: "{{ button_code == 'down_press_release' and (is_state('cover.bedroom_shutter', 'opening') or is_state('cover.bedroom_shutter', 'closing')) }}"
51 | sequence:
52 | - service: cover.stop_cover
53 | entity_id: cover.bedroom_shutter
54 |
55 | ## Button 3 Release Short Press: Close Bedroom Shutter
56 | - conditions: "{{ button_code == 'down_press_release' }}"
57 | sequence:
58 | - service: cover.close_cover
59 | entity_id: cover.bedroom_shutter
60 |
61 | ## Button 3 Hold: Open Bedroom Shutter
62 | - conditions: "{{ button_code == 'down_hold' }}"
63 | sequence:
64 | - service: cover.open_cover
65 | entity_id: cover.bedroom_shutter
66 |
67 | ## Button 4 Short Press: Black Tablet
68 | - conditions: "{{ button_code == 'off_press' }}"
69 | sequence:
70 | - service: switch.toggle
71 | entity_id: switch.black_tablet_screen
72 |
--------------------------------------------------------------------------------
/python_scripts/ac_damper.py:
--------------------------------------------------------------------------------
1 | options = { 'blocking': True }
2 | enableLog = False
3 |
4 | #Params
5 | room = data['room']
6 | action = data['action']
7 |
8 | if ('speed' in data) :
9 | requested_speed = data['speed']
10 | else:
11 | requested_speed = 'None'
12 |
13 | #Entity IDs
14 | damper_speed_entity_id = "input_select.ac_damper_" + room
15 | damper_state_entity_id = "input_boolean.ac_damper_" + room
16 | last_ac_mode_entity_id = "input_text.last_ac_mode"
17 |
18 | #Vars
19 | damper_state = hass.states.get(damper_state_entity_id).state
20 | last_ac_mode = hass.states.get(last_ac_mode_entity_id).state
21 |
22 | if enableLog:
23 | logger.debug("damper_state=" + damper_state)
24 | logger.debug("last_ac_mode=" + last_ac_mode)
25 |
26 | def send_command(room, speed):
27 | command_entity_id = "ac_damper_" + speed.lower()
28 | if (speed != "off"):
29 | command_entity_id = command_entity_id + "_" + last_ac_mode
30 |
31 | if enableLog:
32 | logger.debug("Run script: script." + command_entity_id + " in room: " + room)
33 | hass.services.call('script', command_entity_id , { 'room' : room } , options)
34 |
35 | def turn_damper_on():
36 | hass.services.call('input_boolean', "turn_on" , { 'entity_id': damper_state_entity_id }, options)
37 | if enableLog:
38 | logger.debug("Turn on entity_id: " + damper_state_entity_id)
39 |
40 | speed = hass.states.get(damper_speed_entity_id).state
41 |
42 | if (speed == 'SmartAuto'):
43 | speed = "low"
44 | elif (speed == 'Quick'):
45 | speed = "high"
46 |
47 | send_command(room, speed)
48 |
49 | if (action == 'set_speed'):
50 | #Just save the new speed
51 | if enableLog:
52 | logger.debug("Set entity_id: " + damper_speed_entity_id + " to: " + requested_speed)
53 | hass.services.call('input_select', "select_option" , { 'entity_id': damper_speed_entity_id, 'option': requested_speed }, options)
54 |
55 | #if (damper_state == 'on'):
56 | turn_damper_on()
57 |
58 | if (action == 'send_command'):
59 | send_command(room, requested_speed)
60 |
61 | if (action == 'turn_on') and (requested_speed == None): #This is done to ignore turning on the damper twice (happens when setting speed when it's off)
62 | turn_damper_on()
63 |
64 | if (action == 'turn_off') :
65 | if enableLog:
66 | logger.debug("Turn off entity_id: " + damper_state_entity_id)
67 | hass.services.call('input_boolean', "turn_off" , { 'entity_id': damper_state_entity_id }, options)
68 |
69 | send_command(room, "off")
70 |
71 | if (action == 'sync') :
72 | hass.services.call('input_boolean', "turn_on" , { 'entity_id': 'input_boolean.ac_damper_oscillating' }, options)
73 | if (damper_state == 'on') :
74 | last_ac_mode = hass.states.get(last_ac_mode_entity_id).state
75 | damper_speed = hass.states.get(damper_speed_entity_id).state
76 | send_command(room, damper_speed)
77 |
78 | else :
79 | send_command(room, "off")
80 |
81 | hass.services.call('input_boolean', "turn_off" , { 'entity_id': 'input_boolean.ac_damper_oscillating' }, options)
82 |
83 | #Update current temp
84 | #hass.services.call('python_script', 'update_ac_room_temp', { 'room': room }, options)
85 |
86 |
87 |
--------------------------------------------------------------------------------
/packages/Services/water_consumption.yaml:
--------------------------------------------------------------------------------
1 | input_text:
2 | water_partial_period_start:
3 | name: Water Partial Period Start
4 | water_partial_period_end:
5 | name: Water Partial Period End
6 | water_monthly_additional_cost:
7 | name: Water Monthly Additional Cost
8 | water_nis_per_cubic_meter_low_rate:
9 | name: NIS Per Cubic Meter of Water (Low)
10 | water_nis_per_cubic_meter_high_rate:
11 | name: NIS Per Cubic Meter of Water (High)
12 |
13 |
14 | counter:
15 | partial_water_bill_days:
16 | name: Partial Bill Days Count
17 | initial: 0
18 | step: 1
19 |
20 | sensor:
21 | - platform: template
22 | sensors:
23 | water_total_partial_bill:
24 | friendly_name: "Total Water Partial Bill"
25 | value_template: "{{ (states('input_text.water_partial_period_end') | float) - (states('input_text.water_partial_period_start') | float) }}"
26 | unit_of_measurement: "m³"
27 |
28 | - platform: template
29 | sensors:
30 | water_total_partial_bill_cost:
31 | friendly_name: "Partial Bill Cost"
32 | value_template: "{{ ((states('sensor.water_total_partial_bill') | float) * (states('input_text.water_nis_per_cubic_meter_low_rate') | float) + (states('input_text.water_monthly_additional_cost')|int / 60 * states('counter.partial_water_bill_days')|int ) ) |round(1) }}"
33 | unit_of_measurement: "NIS"
34 |
35 |
36 | automation:
37 | - alias: Water count partial bill
38 | mode: restart
39 | trigger:
40 | - platform: time
41 | at: "00:00:00"
42 | action:
43 | #Increment the days count
44 | - service: counter.increment
45 | target:
46 | entity_id: counter.partial_water_bill_days
47 | #Make sure the meter sensor is readable (will wait until the automation is triggered to run again)
48 | - wait_template: "{{ not is_state('sensor.water_consumption_meter', 'unavailable') and not is_state('sensor.water_consumption_meter', 'unknown') }}"
49 | #Update the period end input_text
50 | - service: input_text.set_value
51 | data:
52 | entity_id: input_text.water_partial_period_end
53 | value: "{{ states('sensor.water_consumption_meter') }}"
54 |
55 |
56 | switch:
57 | - platform: template
58 | switches:
59 | count_partial_water_bill:
60 | unique_id: "Count Partial Water Bill"
61 | friendly_name: "Count Partial Water Bill"
62 | value_template: "{{ is_state('automation.water_count_partial_bill', 'on') }}"
63 | turn_on:
64 | - service: input_text.set_value
65 | data:
66 | entity_id:
67 | - input_text.water_partial_period_start
68 | - input_text.water_partial_period_end
69 | value: "{{ states('sensor.water_consumption_meter') }}"
70 | - service: counter.reset
71 | target:
72 | entity_id: counter.partial_water_bill_days
73 | - service: automation.turn_on
74 | target:
75 | entity_id: automation.water_count_partial_bill
76 |
77 | turn_off:
78 | - service: automation.turn_off
79 | target:
80 | entity_id: automation.water_count_partial_bill
--------------------------------------------------------------------------------
/lovelace/decluttering_templates/tablet_control.yaml:
--------------------------------------------------------------------------------
1 | tablet_control:
2 | card:
3 | type: vertical-stack
4 | cards:
5 | - type: horizontal-stack
6 | cards:
7 | #On/Off Button
8 | - type: custom:button-card
9 | template: ha-button
10 | entity: switch.[[tablet_id]]_screen
11 | icon: mdi:tablet-cellphone
12 | name: On / Off
13 | hold_action:
14 | action: more-info
15 |
16 | #Reolink Button
17 | - type: custom:button-card
18 | name: Reolink
19 | template: ha-button
20 | entity_picture: /local/photos/reolink.png
21 | show_entity_picture: true
22 | tap_action:
23 | action: call-service
24 | service: rest_command.[[tablet_id]]_run_reolink
25 |
26 | #Home Assistant Button
27 | - type: custom:button-card
28 | name: Home Assistant
29 | template: ha-button
30 | entity_picture: /local/photos/homeassistant.png
31 | show_entity_picture: true
32 | tap_action:
33 | action: call-service
34 | service: "button.press"
35 | service_data:
36 | entity_id: button.[[tablet_id]]_bring_to_foreground
37 |
38 | - type: horizontal-stack
39 | cards:
40 | #Volume Toggle Button
41 | - type: custom:button-card
42 | name: Volume
43 | template: ha-button
44 | entity: input_number.[[tablet_id]]_volume
45 | tap_action:
46 | action: call-service
47 | service: script.toggle_tablet_volume
48 | service_data:
49 | entity_id: input_number.[[tablet_id]]_volume
50 | default_value: 4
51 | hold_action:
52 | action: more-info
53 | icon: mdi:volume-high
54 | state:
55 | - value: 0
56 | color: rgb(68, 115, 158)
57 | icon: mdi:volume-off
58 | - operator: ">"
59 | value: 0
60 | icon: mdi:volume-high
61 | color: rgb(253, 216, 53)
62 |
63 | #Display Toggle Button
64 | - type: custom:button-card
65 | name: Display
66 | template: ha-button
67 | entity: switch.[[tablet_id]]_screensaver
68 | hold_action:
69 | action: more-info
70 | entity: number.[[tablet_id]]_screen_brightness
71 | state:
72 | - value: "on"
73 | icon: mdi:brightness-5
74 | color: rgb(68, 115, 158)
75 | - value: "off"
76 | icon: mdi:brightness-7
77 | color: rgb(253, 216, 53)
78 |
79 | #Volume Slider
80 | # - type: custom:slider-entity-row
81 | # entity: input_number.[[tablet_id]]_volume
82 | # icon: mdi:volume-high
83 | # grow: true
84 |
85 | #Brightness Slider
86 | # - type: custom:slider-entity-row
87 | # name: Brightness
88 | # entity: number.[[tablet_id]]_screen_brightness
89 | # icon: mdi:brightness-7
90 | # grow: true
91 |
--------------------------------------------------------------------------------
/lovelace/views/06_sensors.yaml:
--------------------------------------------------------------------------------
1 | icon: mdi:motion-sensor
2 | panel: false
3 | path: sensors
4 | title: Sensors
5 | visible:
6 | - user: aa6d3713da1a4e1eac92dd176a3ae708
7 | badges: []
8 | cards:
9 | - type: custom:button-card
10 | template: back-button
11 |
12 | - type: entities
13 | entities:
14 | - entity: input_boolean.z2m_bedroom_permit_join
15 | - entity: input_boolean.z2m_living_room_permit_join
16 |
17 | - type: entities
18 | entities:
19 | - entity: sensor.unavailable_entities
20 | title: New Unavailable Entities
21 | - type: custom:auto-entities
22 | card:
23 | type: entities
24 | title: Motion Sensors
25 | filter:
26 | include:
27 | - domain: binary_sensor
28 | entity_id: "*_motion"
29 | - domain: binary_sensor
30 | entity_id: "*_presence"
31 | exclude: []
32 | sort:
33 | method: state
34 | - type: custom:auto-entities
35 | card:
36 | type: entities
37 | title: Leak Sensors
38 | filter:
39 | include:
40 | - domain: binary_sensor
41 | entity_id: "*_leak"
42 | exclude: []
43 | sort:
44 | method: state
45 | - type: custom:auto-entities
46 | card:
47 | type: entities
48 | title: Door Sensors
49 | filter:
50 | include:
51 | - domain: binary_sensor
52 | attributes:
53 | device_class: door
54 | exclude: []
55 | sort:
56 | method: state
57 | - type: custom:auto-entities
58 | card:
59 | type: entities
60 | title: Window Sensors
61 | filter:
62 | include:
63 | - domain: binary_sensor
64 | attributes:
65 | device_class: window
66 | exclude: []
67 | sort:
68 | method: state
69 | - entities:
70 | - entity: binary_sensor.rain
71 | show_header_toggle: false
72 | title: Other Sensors
73 | type: entities
74 | - type: custom:auto-entities
75 | card:
76 | type: entities
77 | title: Low Battery Levels
78 | filter:
79 | include:
80 | - domain: sensor
81 | entity_id: "*_battery*"
82 | state: <=99
83 | exclude:
84 | - domain: sensor
85 | entity_id: "*_battery_power"
86 | - domain: sensor
87 | entity_id: "*_battery_temperature"
88 | - entity_id: sensor.ups_time_on_battery
89 | - entity_id: sensor.inbal_s10plus_battery_level
90 | - entity_id: sensor.inbal_zenfone9_battery_level
91 | - entity_id: sensor.house_tablet_battery_level
92 | - entity_id: sensor.black_tablet_battery_level
93 | sort:
94 | method: state
95 | # - type: entities
96 | # entities:
97 | # - entity: sensor.red_alert_in_my_area
98 | # - entity: sensor.red_alert
99 | # - entity: automation.red_alert_close_shutters
100 | # - entity: automation.red_alert_turn_on_lights_living_room_kitchen
101 | # - entity: automation.red_alert_turn_on_lights_office
102 | # - entity: automation.red_alert_turn_on_lights_guests
103 | # - entity: automation.red_alert_turn_on_lights_bedroom
104 | # title: Red Alert
105 |
--------------------------------------------------------------------------------
/packages/Climate/office_fan.yaml:
--------------------------------------------------------------------------------
1 | script:
2 |
3 | office_fan_control:
4 | alias: Office Fan Control
5 | variables:
6 | office_fan_rf_code: >
7 | {% set rf_codes = {
8 | "light": "sg80AAwAAWYjDCMMIwwjDAwjDCMMIyMMIwwMJAwjIwwjDQwkDCMMIw0jDSMjDCQMDCQjDAwjIw4AAAAA",
9 | "fan_0": "sgD8ACMLDCINIgwiIwwjCwwiDCIkCyMLDCINIgwjCyMMIiMLJAsjCyMLDCIMJQwAAWUjCyMLJAsjCwwiDCMMIiMLJAsMIgwiJAojDAwiDCINIgwiDCMjCyMLIwskCwwiDCQMAAFmIwsjCyMLJAsMIgwkCiMjCyMLDSIMIiQKIwsNIgwiDSIMIgwjIwsjCyMLIwsNIgwjDQABZSMLJAsjCyMLDCMLIwwiJAsjCwwjDCIjCyMLDCMMIgwjDCIMIiMMIwsjCyMMCyMMJAwAAWYjCyMLIwsjCwwjDCMLIyMLIwwLIwsjIwwiDAsjDCMLIwskCyMiDCMMIgwiDAsjDAAF3AAAAAAAAAAAAAAAAA==",
10 | "fan_1": "sgk0AAwAAWYjDSMMIwwjDAwkDCQMJCMNIwwMJAwkIwwjDQwjDCMMJAwjDCMjDCMMIwwMIwwjDCUAAAAA",
11 | "fan_2": "sgc0AAwAAWYkDCMMIwwjDAwjDCMNIyMMIwwMIw0jIwwjDAwjDSMMJA0jDCMkDCMMDCMNIyMMDCUAAAAA",
12 | "fan_3": "sgD8ACMLDCMMIgwiJAsjCwwiDSIjCyMLDSIMIgwiDCMMIiMMIgwMIiMLIwwMJAwAAWUjCyMLIwsjCw0iDCINIiMMIgsNIgwiJAsjCwwiDCMLIwwiDSIjCyMLDCIjDCMLDCMNAAFlIwsjCyQLIwsMIgwjDCIjCyQLDCINIiMLIwsMIg0iDCIMIwwiIwsjCw0iIwsjCwwkDAABZiIMIwsjCyMLDCINIgwjIgskCwwiDCIkCyMLDCINIgwiDCMMIiMLIwwMIiMLJAoMJA0AAWUjCyMLIwsjDAwiDCINIiMLIwsMIwwiIwsjDAwiDCIMIwwiDCMjCyMLDCIkCyMLDAAF3AAAAAAAAAAAAAAAAA=="
13 | }
14 | %}{{ rf_codes[action] }}
15 |
16 | sequence:
17 | - service: python_script.broadlink_send
18 | data:
19 | room: "office"
20 | packet: "{{ office_fan_rf_code }}"
21 |
22 | input_boolean:
23 | office_fan_power:
24 |
25 | input_number:
26 | office_fan_speed:
27 | name: Office Fan Speed
28 | min: 0
29 | max: 3
30 | step: 1
31 |
32 | fan:
33 | - platform: template
34 | fans:
35 | office_fan:
36 | friendly_name: "Office Fan"
37 | unique_id: "Office Fan"
38 | value_template: "{{ states('input_boolean.office_fan_power') }}"
39 | percentage_template: "{{ (states('input_number.office_fan_speed') | int * 33.333 ) | round }}"
40 | speed_count: 3
41 |
42 | turn_on:
43 | #Send ON (speed) command
44 | - service: script.office_fan_control
45 | data:
46 | action: "fan_{{ states('input_number.office_fan_speed') | round }}"
47 |
48 | #Mark fan as on
49 | - service: input_boolean.turn_on
50 | entity_id: input_boolean.office_fan_power
51 |
52 | set_percentage:
53 | #Save new speed
54 | - service: input_number.set_value
55 | entity_id: input_number.office_fan_speed
56 | data:
57 | value: "{{ (percentage / 33.333) | round }}"
58 |
59 | #Send speed command
60 | - service: script.office_fan_control
61 | data:
62 | action: "fan_{{ states('input_number.office_fan_speed') | round }}"
63 |
64 | #Mark fan as on
65 | - service: input_boolean.turn_on
66 | entity_id: input_boolean.office_fan_power
67 |
68 | turn_off:
69 | - service: script.office_fan_control
70 | data:
71 | action: "fan_0"
72 |
73 | #Mark fan as off
74 | - service: input_boolean.turn_off
75 | entity_id: input_boolean.office_fan_power
76 |
--------------------------------------------------------------------------------
/ui_lovelace_minimalist/custom_cards/climate_room_button/climate_room_button.yaml:
--------------------------------------------------------------------------------
1 | climate_room_button:
2 | state:
3 | - value: heat_fan_only
4 | id: "heat_fan_only"
5 | icon: mdi:heat-wave
6 | styles:
7 | icon:
8 | - color: "rgba(var(--color-red),1)"
9 | label:
10 | - color: "rgba(var(--color-red-text),1)"
11 | name:
12 | - color: "rgba(var(--color-red-text),1)"
13 | img_cell:
14 | - background-color: "rgba(var(--color-red), 0.2)"
15 |
16 | - value: cool_fan_only
17 | id: "cool_fan_only"
18 | icon: mdi:snowflake
19 | styles:
20 | icon:
21 | - color: "rgba(var(--color-blue),1)"
22 | label:
23 | - color: "rgba(var(--color-blue-text),1)"
24 | name:
25 | - color: "rgba(var(--color-blue-text),1)"
26 | img_cell:
27 | - background-color: "rgba(var(--color-blue), 0.2)"
28 |
29 | - value: fan_only_fan_only
30 | id: "fan_only_fan_only"
31 | icon: mdi:fan
32 | styles:
33 | icon:
34 | - color: "rgba(var(--color-blue),1)"
35 | label:
36 | - color: "rgba(var(--color-blue-text),1)"
37 | name:
38 | - color: "rgba(var(--color-blue-text),1)"
39 | img_cell:
40 | - background-color: "rgba(var(--color-blue), 0.2)"
41 |
42 | - value: dry_fan_only
43 | id: "dry_fan_only"
44 | icon: mdi:water-percent
45 | styles:
46 | icon:
47 | - color: "rgba(var(--color-blue),1)"
48 | label:
49 | - color: "rgba(var(--color-blue-text),1)"
50 | name:
51 | - color: "rgba(var(--color-blue-text),1)"
52 | img_cell:
53 | - background-color: "rgba(var(--color-blue), 0.2)"
54 |
55 | - value: auto_fan_only
56 | id: "auto_fan_only"
57 | icon: mdi:autorenew
58 | styles:
59 | icon:
60 | - color: "rgba(var(--color-blue),1)"
61 | label:
62 | - color: "rgba(var(--color-blue-text),1)"
63 | name:
64 | - color: "rgba(var(--color-blue-text),1)"
65 | img_cell:
66 | - background-color: "rgba(var(--color-blue), 0.2)"
67 |
68 | - value: heat_off
69 | id: "heat_off"
70 | icon: mdi:heat-wave
71 |
72 | - value: cool_off
73 | id: "cool_off"
74 | icon: mdi:snowflake
75 |
76 | - value: fan_only_off
77 | id: "fan_only_off"
78 | icon: mdi:fan
79 |
80 | - value: dry_off
81 | id: "dry_off"
82 | icon: mdi:water-percent
83 |
84 | - value: auto_off
85 | id: "auto_off"
86 | icon: mdi:autorenew
87 |
88 | - value: off_fan_only
89 | id: "off_fan_only"
90 | icon: mdi:power-plug-off-outline
91 | styles:
92 | icon:
93 | - color: "rgba(var(--color-blue),1)"
94 | label:
95 | - color: "rgba(var(--color-blue-text),1)"
96 | name:
97 | - color: "rgba(var(--color-blue-text),1)"
98 | img_cell:
99 | - background-color: "rgba(var(--color-blue), 0.2)"
100 |
101 | - value: off_off
102 | id: "off"
103 | icon: mdi:power-plug-off-outline
104 |
--------------------------------------------------------------------------------
/lovelace/cards/windows.yaml:
--------------------------------------------------------------------------------
1 | type: custom:layout-card
2 | layout_type: custom:grid-layout
3 | layout:
4 | # grid-template-columns: repeat(5, 1fr)
5 | # grid-template-rows: repeat(2, 1fr)
6 | grid-template-columns: repeat(2, 1fr)
7 | grid-template-rows: repeat(4, 1fr)
8 | grid-gap: 0px
9 | margin: 0px
10 |
11 | # mediaquery:
12 | # "(max-width: 600px)":
13 | # grid-template-columns: repeat(2, 1fr)
14 | # grid-template-rows: repeat(4, 1fr)
15 |
16 | cards:
17 |
18 | #Balcony
19 | - type: 'custom:button-card'
20 | template:
21 | - card_room_windows
22 | - purple_on
23 | name: Balcony
24 | icon: mdi:sofa
25 | entity: binary_sensor.balcony_window
26 | variables:
27 | card_room_windows_shutter_entity: "cover.living_room_shutter"
28 | card_room_windows_curtain_entity: "cover.living_room_curtain"
29 | card_room_windows_tap_action_navigation_path: "living-room"
30 |
31 | #Kitchen
32 | - type: 'custom:button-card'
33 | template:
34 | - card_room_windows
35 | - purple_on
36 | name: Kitchen
37 | icon: mdi:faucet-variant
38 | entity: binary_sensor.kitchen_window
39 | variables:
40 | card_room_windows_shutter_entity: "cover.kitchen_shutter"
41 | card_room_windows_curtain_entity: "cover.kitchen_curtain"
42 | card_room_windows_tap_action_navigation_path: "living-room"
43 |
44 | #Office
45 | - type: 'custom:button-card'
46 | template:
47 | - card_room_windows
48 | name: Office
49 | icon: mdi:monitor
50 | entity: binary_sensor.office_window
51 | variables:
52 | card_room_windows_shutter_entity: "cover.office_shutter"
53 | card_room_windows_curtain_entity: "cover.office_curtain"
54 | card_room_windows_tap_action_navigation_path: "office"
55 |
56 | #Guests
57 | - type: 'custom:button-card'
58 | template:
59 | - card_room_windows
60 | - purple_on
61 | name: Guests
62 | icon: mdi:account-multiple
63 | entity: binary_sensor.guests_window
64 | variables:
65 | card_room_windows_shutter_entity: "cover.guests_shutter"
66 | card_room_windows_tap_action_navigation_path: "guests"
67 |
68 | #Bedroom
69 | - type: 'custom:button-card'
70 | template:
71 | - card_room_windows
72 | name: Bedroom
73 | icon: mdi:bed-king-outline
74 | entity: binary_sensor.bedroom_window
75 | variables:
76 | card_room_windows_shutter_entity: "cover.bedroom_shutter"
77 | card_room_windows_curtain_entity: "cover.bedroom_curtain"
78 | card_room_windows_tap_action_navigation_path: "bedroom"
79 |
80 | #Riley
81 | - type: 'custom:button-card'
82 | template:
83 | - card_room_windows
84 | - purple_on
85 | name: Riley
86 | icon: mdi:face-woman-outline
87 | entity: binary_sensor.riley_window
88 | variables:
89 | card_room_windows_tap_action_navigation_path: "riley"
90 |
91 | #Bathroom
92 | - type: 'custom:button-card'
93 | template:
94 | - card_room_windows
95 | - purple_on
96 | name: Bathroom
97 | icon: mdi:shower
98 | entity: binary_sensor.bathroom_window
99 | variables:
100 | card_room_windows_tap_action_navigation_path: "bathroom"
--------------------------------------------------------------------------------
/lovelace/room_cards/bedroom/lights.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | - type: custom:button-card
4 | template: title
5 | name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.lights ]]]"
6 |
7 | # - type: conditional
8 | # conditions:
9 | # - entity: light.bedroom_dimmable_lights
10 | # state: "on"
11 | # card:
12 | # type: custom:slider-entity-row
13 | # entity: light.bedroom_dimmable_lights
14 | # full_row: true
15 | # min: 1
16 | # max: 100
17 | # step: 5
18 |
19 | # - type: horizontal-stack
20 | # cards:
21 |
22 | # - type: custom:button-card
23 | # template: ha-button
24 | # entity: light.bedroom_main
25 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.main ]]]"
26 | # icon: mdi:lightbulb-outline
27 |
28 | # - type: custom:button-card
29 | # template: ha-button
30 | # entity: light.bedroom_entrance
31 | # name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.entrance ]]]"
32 | # icon: mdi:door
33 |
34 | # - type: custom:button-card
35 | # template: ha-button
36 | # entity: light.bedroom_closet
37 | # name: "Closet"
38 | # icon: mdi:hanger
39 |
40 | - type: custom:layout-card
41 | layout_type: custom:grid-layout
42 | layout:
43 | grid-template-columns: repeat(3, 1fr)
44 | grid-auto-flow: row
45 | grid-gap: 0px
46 | margin: 0px
47 |
48 | mediaquery:
49 | "(max-width: 600px)":
50 | grid-template-columns: repeat(2, 1fr)
51 | cards:
52 |
53 | - type: "custom:button-card"
54 | template:
55 | - custom_card_light
56 | - fill_container
57 | entity: light.bedroom_main
58 | variables:
59 | ulm_card_light_force_background_color: true
60 | ulm_card_light_name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.fan ]]]"
61 | ulm_card_light_icon: mdi:ceiling-fan-light
62 |
63 | - type: "custom:button-card"
64 | template:
65 | - custom_card_light
66 | - fill_container
67 | entity: light.bedroom_entrance
68 | variables:
69 | ulm_card_light_enable_slider: true
70 | ulm_card_light_enable_collapse: false
71 | ulm_card_light_force_background_color: true
72 | ulm_card_light_name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.entrance ]]]"
73 | ulm_card_light_icon: mdi:door
74 |
75 | - type: "custom:button-card"
76 | template:
77 | - custom_card_light
78 | - fill_container
79 | entity: light.bedroom_closet
80 | variables:
81 | ulm_card_light_force_background_color: true
82 | ulm_card_light_name: "[[[ return states['sensor.localization_' + states['input_select.local_lang_' + user.name.replace(' ','_').toLowerCase()].state].attributes.closet ]]]"
83 | ulm_card_light_icon: mdi:hanger
--------------------------------------------------------------------------------
/lovelace/cards/guest_mode.yaml:
--------------------------------------------------------------------------------
1 | type: vertical-stack
2 | cards:
3 | # - type: entities
4 | # entities:
5 | # - sensor.guest_names
6 | # - sensor.guests_connected_to_wifi
7 |
8 | - type: custom:mushroom-chips-card
9 | alignment: center
10 | chips:
11 | - type: template
12 | icon: mdi:account-circle
13 | icon_color: '{{ "" if states(entity) == "No known guests" else "green" }}'
14 | entity: sensor.guest_names
15 | content: '{{ states(entity) }}'
16 | tap_action:
17 | action: more-info
18 |
19 | - type: template
20 | icon: mdi:wifi
21 | icon_color: '{{ '''' if states(entity) == ''0'' else ''green'' }}'
22 | entity: sensor.guests_connected_to_wifi
23 | content: '{{ states(entity) }} connected'
24 | tap_action:
25 | action: more-info
26 |
27 | - type: custom:button-card
28 | template: ha-button
29 | entity: input_boolean.guest_mode
30 | icon: mdi:account-multiple
31 | name: Guest Mode Enabled
32 |
33 | - type: vertical-stack
34 | cards:
35 | - type: custom:button-card
36 | template: title
37 | name: Configuration
38 |
39 | - type: horizontal-stack
40 | cards:
41 |
42 | - type: custom:button-card
43 | template: ha-button-small-label
44 | name: Guest Mode
45 | label: Enable Automatically
46 | show_label: true
47 | entity: group.guest_mode_automations
48 | icon: mdi:account-outline
49 |
50 | - type: custom:button-card
51 | template: ha-button-small-label
52 | name: Schedules
53 | label: in Guests Room
54 | show_label: true
55 | entity: switch.guest_schedules
56 | icon: mdi:timer-outline
57 |
58 | - type: horizontal-stack
59 | cards:
60 |
61 | - type: custom:button-card
62 | template: ha-button-small-label
63 | entity: input_boolean.simple_smart_home_mode
64 | name: Simple Mode
65 | label: for AC Buttons
66 | show_label: true
67 | icon: mdi:account-check
68 |
69 |
70 | - type: custom:button-card
71 | template: ha-button-small-label
72 | entity: automation.unlock_door_when_guests_arrive
73 | name: Unlock Door
74 | label: When Guests Arrive
75 | show_label: true
76 | icon: mdi:door-closed-lock
77 |
78 | # - type: custom:auto-entities
79 | # card_param: chips
80 | # card:
81 | # type: custom:mushroom-chips-card
82 | # filter:
83 | # template: "{{ state_attr('person.guests', 'device_trackers') | select('is_state', 'home') | list }}"
84 | # show_empty: false
85 |
86 |
87 | # - type: custom:auto-entities
88 | # card:
89 | # type: custom:mushroom-chips-card
90 | # card_param: chips
91 | # show_empty: false
92 | # include:
93 | # - domain: device_tracker
94 | # state: 'home'
95 | # filter:
96 | # template: "{{ state_attr('person.guests', 'device_trackers') | select('is_state', 'home') | list }}"
97 | # options:
98 | # type: entity
99 | # entity: this.entity_id
100 | # icon: mdi:account-circle
101 |
102 |
--------------------------------------------------------------------------------
/packages/Devices/laundry_machine.yaml:
--------------------------------------------------------------------------------
1 | input_select:
2 | laundry_machine_status:
3 | name: Laundry Machine Status
4 | options:
5 | - Idle
6 | - Running
7 | - Clean
8 |
9 | group:
10 | laundry_machine_automations:
11 | entities:
12 | - automation.laundry_machine_set_status
13 | - automation.laundry_machine_finished_running
14 |
15 | automation:
16 | - alias: Laundry Machine - Set Status
17 | trigger:
18 | #Idle
19 | - id: "Idle"
20 | platform: state
21 | entity_id: binary_sensor.laundry_machine_door
22 | from: "off"
23 | to: "on"
24 | #Running
25 | - id: "Running"
26 | platform: numeric_state
27 | entity_id: sensor.laundry_machine_power
28 | above: 10
29 | #Clean
30 | - id: "Clean"
31 | platform: numeric_state
32 | entity_id: sensor.laundry_machine_power
33 | below: 1
34 | for:
35 | minutes: 20
36 | condition:
37 | - condition: or
38 | conditions:
39 | - condition: and
40 | conditions:
41 | #Make sure to set the machine to Clean only if the previous state was Running
42 | - alias: "The new state is Clean"
43 | condition: template
44 | value_template: "{{ trigger.id == 'Clean' }}"
45 | - alias: "And the previous state is Running"
46 | condition: state
47 | entity_id: input_select.laundry_machine_status
48 | state: "Running"
49 |
50 | - alias: "Or any other state"
51 | condition: template
52 | value_template: "{{ trigger.id != 'Clean' }}"
53 | action:
54 | - service: input_select.select_option
55 | data:
56 | entity_id: input_select.laundry_machine_status
57 | option: "{{ trigger.id }}"
58 |
59 | #Automation that notifies everyone that the laundry is ready every 30 minutes if it hasn't been taken out
60 | - id: Laundry Machine - Finished running reminder
61 | alias: Laundry Machine - Finished running reminder
62 | trigger:
63 | - platform: state
64 | entity_id: input_select.laundry_machine_status
65 | from: "Running"
66 | to: "Clean"
67 | action:
68 | - repeat:
69 | while:
70 | #Keep bugging until the door has been opened
71 | - condition: state
72 | entity_id: input_select.laundry_machine_status
73 | state: "Clean"
74 | # Don't do it too many times
75 | - condition: template
76 | value_template: "{{ repeat.index <= 10 }}"
77 | sequence:
78 | - service: notify.bffs
79 | data:
80 | message: "The Laundry Machine has finished {{ 15 + (30 * (repeat.index - 1)) }} minutes ago, please take the clean laundry out"
81 | - delay:
82 | minutes: "{{ 30 * (repeat.index)}}"
83 |
84 | #Automation that turns the power on for the laundry machine (in case of power outage)
85 | - id: Laundry Machine - Make Sure Power is On
86 | alias: Laundry Machine - Make Sure Power is On
87 | trigger:
88 | - platform: state
89 | entity_id: switch.laundry_machine
90 | to: "off"
91 | for:
92 | minutes: 5
93 | action:
94 | service: switch.turn_on
95 | entity_id: switch.laundry_machine
--------------------------------------------------------------------------------