General
The Home Assistant OS, installed via the Proxmox Community Script, to easily manage all smart home devices. This way I can add devices to my Apple HomeKit that would normally not be compatible.
Automations
Fire Alarm
alias: Fire Alarm
description: >-
An automation that alerts all mobile clients and turns every light to the
brightest setting.
triggers:
- type: smoke
device_id: a64a79a3f5968b9979fd3db73d997d51
entity_id: 5340a05ab5b6049ff76d13bb8bb5a6fd
domain: binary_sensor
trigger: device
conditions: []
actions:
- action: light.turn_on
metadata: {}
data:
kelvin: 6500
brightness_pct: 100
target:
label_id: light
- action: script.notify_clients_critically
metadata: {}
data:
message: Fire @ Home 🔥
mode: single
Lights at Sunset
alias: Niklas Lights Sunset
description: >-
An automation that turns on the lights at sunset to a specified brightness
setting.
triggers:
- trigger: sun
event: sunset
offset: 0
conditions: []
actions:
- action: script.niklas_ceiling_lights_brightness
metadata: {}
data:
percent: 10
mode: single
Motion
alias: Niklas motion
description: >-
An automation that activates a specific light when it detects motion and also
deactivates after two minutes of no motion
triggers:
- type: motion
device_id: a916991384e0b975a9fdf81013c101c0
entity_id: 541fcf5a3cfa9b4db6f517b07bc4e038
domain: binary_sensor
trigger: device
id: "1"
- type: no_motion
device_id: a916991384e0b975a9fdf81013c101c0
entity_id: 541fcf5a3cfa9b4db6f517b07bc4e038
domain: binary_sensor
trigger: device
for:
hours: 0
minutes: 2
seconds: 0
id: "2"
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- "1"
sequence:
- action: light.turn_on
metadata: {}
data: {}
target:
entity_id: light.niklas_ceiling_lamp
- conditions:
- condition: trigger
id:
- "2"
sequence:
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.niklas_ceiling_lamp
mode: single
Switch
alias: Niklas Switch
description: >-
An automation that handles the button presses of the Shelly Switch to control
lights.
triggers:
- device_id: 1116faebff9a146fb8548824987d2047
domain: bthome
type: button_1
subtype: press
trigger: device
id: "1"
- device_id: 1116faebff9a146fb8548824987d2047
domain: bthome
type: button_2
subtype: press
trigger: device
id: "2"
- device_id: 1116faebff9a146fb8548824987d2047
domain: bthome
type: button_3
subtype: press
trigger: device
id: "3"
- device_id: 1116faebff9a146fb8548824987d2047
domain: bthome
type: button_4
subtype: press
trigger: device
id: "4"
- device_id: 1116faebff9a146fb8548824987d2047
domain: bthome
type: button_3
subtype: double_press
trigger: device
id: "5"
- device_id: 1116faebff9a146fb8548824987d2047
domain: bthome
type: button_4
subtype: double_press
trigger: device
id: "6"
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- "1"
sequence:
- action: script.niklas_ceiling_lights_toggle
metadata: {}
data: {}
- conditions:
- condition: trigger
id:
- "2"
sequence:
- action: automation.toggle
metadata: {}
data: {}
target:
entity_id: automation.niklas_motion
- conditions:
- condition: trigger
id:
- "3"
sequence:
- action: script.niklas_ceiling_lights_brightness_step
metadata: {}
data:
percent: 10
- conditions:
- condition: trigger
id:
- "4"
sequence:
- action: script.niklas_ceiling_lights_brightness_step
metadata: {}
data:
percent: -10
- conditions:
- condition: trigger
id:
- "5"
sequence:
- action: script.niklas_ceiling_lights_brightness
metadata: {}
data:
percent: 100
- conditions:
- condition: trigger
id:
- "6"
sequence:
- action: script.niklas_ceiling_lights_brightness
metadata: {}
data:
percent: 10
mode: single
Set Temperature
alias: Set temperature
description: >-
An automation that sets the target temperature for radiators, during daytime
and nighttime.
triggers:
- trigger: time
at: "06:30:00"
id: "1"
- trigger: time
at: "21:30:00"
id: "2"
conditions: []
actions:
- variables:
day_temperature: 20
night_temperature: 18
- choose:
- conditions:
- condition: trigger
id:
- "1"
sequence:
- action: climate.set_temperature
metadata: {}
data:
temperature: "{{ day_temperature | float }}"
target:
label_id: radiator
- conditions:
- condition: trigger
id:
- "2"
sequence:
- action: climate.set_temperature
metadata: {}
data:
temperature: "{{ night_temperature | float }}"
target:
label_id: radiator
mode: single
Scripts
Light Brightness
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_pct: "{{ percent }}"
target:
entity_id: light.niklas_ceiling_lamp
alias: Niklas ceiling lights brightness
description: Script to turn lights on with a variable percentage.
Light Brightness Step
sequence:
- action: light.turn_on
metadata: {}
data:
brightness_step_pct: "{{ percent }}"
target:
entity_id: light.niklas_ceiling_lamp
alias: Niklas ceiling lights brightness step
description: Script to increase brightness with a variable step.
Light Toggle
sequence:
- action: light.toggle
metadata: {}
data: {}
target:
entity_id: light.niklas_ceiling_lamp
alias: Niklas ceiling lights toggle
description: Script to toggle a specific light between off and on.
Notify Clients
sequence:
- action: notify.persistent_notification
metadata: {}
data:
message: "{{ message }}"
- action: notify.notify
metadata: {}
data:
message: "{{ message }}"
alias: Notify Clients
description: Script to notify al clients of a variable message.
Notify Clients Critically
sequence:
- action: notify.persistent_notification
metadata: {}
data:
message: "{{ message }}"
- action: notify.mobile_app_niklass_iphone_15_pro
metadata: {}
data:
message: "{{ message }}"
data:
push:
sound:
name: default
critical: 1
volume: 1
- data:
message: "{{ message }}"
data:
ttl: 0
priority: high
channel: alarm_stream
action: notify.mobile_app_pixel_8
alias: Notify Clients Critically
description: Script to notify al clients of a variable message ignoring clients mute status.
Devices
- Shelly Duo RGBW (3x)
- Shelly Smoke Plus
- Shelly Blu Gateway
- Shelly Blu TRV
- Shelly Motion Sensor
- Shelly Bluetooth Switch