Compare commits

..

3 Commits

5 changed files with 308 additions and 40 deletions

View File

@@ -1 +1 @@
2026.1.2 2026.2.2

View File

@@ -1,17 +1,26 @@
- id: '1623153060369' - id: '1623153060369'
alias: Licht bei Sonnenuntergang einschalten alias: Licht bei Sonnenuntergang einschalten
description: '' description: ''
trigger: triggers:
- platform: sun - event: sunset
event: sunset
offset: '-1:00' offset: '-1:00'
condition: trigger: sun
conditions:
- condition: state - condition: state
entity_id: person.marcus_scholz entity_id: person.marcus_scholz
state: home state: home
action: actions:
- service: script.moodlight_orange_plasma - data: {}
data: {} action: script.moodlight_orange_plasma
- action: light.turn_on
metadata: {}
target:
entity_id:
- light.kuche_anrichte
- light.kajplats_e14_cws_globe_806lm
data:
brightness_pct: 75
color_temp_kelvin: 3035
mode: single mode: single
- id: '1623224198352' - id: '1623224198352'
alias: TV Anti-Reflexion alias: TV Anti-Reflexion
@@ -33,14 +42,13 @@
- id: '1623526683767' - id: '1623526683767'
alias: Licht bei Sonnenaufgang ausschalten alias: Licht bei Sonnenaufgang ausschalten
description: '' description: ''
trigger: triggers:
- platform: sun - event: sunrise
event: sunrise
offset: '+1:00' offset: '+1:00'
condition: [] trigger: sun
action: conditions: []
- service: light.turn_off actions:
target: - target:
area_id: area_id:
- schlafzimmer - schlafzimmer
device_id: device_id:
@@ -52,9 +60,10 @@
- 98a9eef603f8c8ae6200c4834a3dbf4f - 98a9eef603f8c8ae6200c4834a3dbf4f
- 32d15eec63fe68d5770813d47da53657 - 32d15eec63fe68d5770813d47da53657
- 9f42805af5b7e423023595390342b9ac - 9f42805af5b7e423023595390342b9ac
- 063e41329df7b29bbaa8df2f508ee6cb entity_id: light.kajplats_e14_cws_globe_806lm
data: data:
transition: 2 transition: 2
action: light.turn_off
mode: single mode: single
- id: '1623673821789' - id: '1623673821789'
alias: Gute Nacht! alias: Gute Nacht!
@@ -464,35 +473,28 @@
- id: '1632477389492' - id: '1632477389492'
alias: Licht beim Heimkommen einschalten alias: Licht beim Heimkommen einschalten
description: Nur während Dunkelphase description: Nur während Dunkelphase
trigger: triggers:
- platform: state - entity_id: person.marcus_scholz
entity_id: person.marcus_scholz
to: home to: home
from: not_home from: not_home
condition: trigger: state
- condition: or
conditions: conditions:
- condition: sun
before: sunrise
before_offset: '+1'
- condition: sun
after_offset: '-1'
after: sunset
enabled: false
- condition: sun - condition: sun
before: sunrise before: sunrise
before_offset: '+1' before_offset: '+1'
after: sunset after: sunset
after_offset: '-1' after_offset: '-1'
action: actions:
- service: script.moodlight_orange_plasma - data: {}
data: {} action: script.moodlight_orange_plasma
- service: light.turn_on - target:
target:
device_id: device_id:
- 32d15eec63fe68d5770813d47da53657
- 53a27edf581fcf40f3bc8b253b1ee369 - 53a27edf581fcf40f3bc8b253b1ee369
data: {} - 5abbb43e5d015ee75c7c900240b4329e
data:
brightness_pct: 75
color_temp_kelvin: 2992
action: light.turn_on
mode: single mode: single
- id: '1648485179021' - id: '1648485179021'
alias: Schalte den Fernseher mit WoL ein alias: Schalte den Fernseher mit WoL ein
@@ -825,13 +827,20 @@
actions: actions:
- data: {} - data: {}
action: script.moodlight_xmas action: script.moodlight_xmas
- target:
device_id:
- 53a27edf581fcf40f3bc8b253b1ee369
- 5abbb43e5d015ee75c7c900240b4329e
data:
brightness_pct: 75
color_temp_kelvin: 2992
action: light.turn_on
- action: switch.turn_on - action: switch.turn_on
metadata: {} metadata: {}
data: {} data: {}
target: target:
device_id: device_id:
- 1f3c4b5de4aea99bac83688ceb22293b - 1f3c4b5de4aea99bac83688ceb22293b
- 48dafb7f4a8ed6ccbb046758cb660c23
mode: single mode: single
- id: '1700483035319' - id: '1700483035319'
alias: Licht bei Sonnenaufgang ausschalten (XMas) alias: Licht bei Sonnenaufgang ausschalten (XMas)
@@ -854,7 +863,7 @@
- 98a9eef603f8c8ae6200c4834a3dbf4f - 98a9eef603f8c8ae6200c4834a3dbf4f
- 32d15eec63fe68d5770813d47da53657 - 32d15eec63fe68d5770813d47da53657
- 9f42805af5b7e423023595390342b9ac - 9f42805af5b7e423023595390342b9ac
- 063e41329df7b29bbaa8df2f508ee6cb - 5abbb43e5d015ee75c7c900240b4329e
data: data:
transition: 2 transition: 2
action: light.turn_off action: light.turn_off
@@ -864,7 +873,6 @@
target: target:
device_id: device_id:
- 1f3c4b5de4aea99bac83688ceb22293b - 1f3c4b5de4aea99bac83688ceb22293b
- 48dafb7f4a8ed6ccbb046758cb660c23
mode: single mode: single
- id: '1701774106609' - id: '1701774106609'
alias: IKEA STYRBAR Wohnzimmer alias: IKEA STYRBAR Wohnzimmer
@@ -1328,3 +1336,30 @@
entity_id: a57a56132635ff48a6d2ae8df322b385 entity_id: a57a56132635ff48a6d2ae8df322b385
domain: switch domain: switch
mode: single mode: single
- id: '1771012833905'
alias: Bewegungssteuerung Flurlicht
description: ''
use_blueprint:
path: aledziko/ikea-myggspray-e2494-matter-motion-sensor.yaml
input:
motion_entity: binary_sensor.myggspray_wrlss_mtn_sensor_belegung
no_motion_wait: 0
illuminance_entity: sensor.myggspray_wrlss_mtn_sensor_beleuchtungsstarke
battery_entity: sensor.myggspray_wrlss_mtn_sensor_batterie
motion_on_action:
- action: light.turn_on
metadata: {}
target:
entity_id:
- light.schreibtisch_deko
data: {}
motion_off_action:
- action: light.turn_off
metadata: {}
target:
entity_id:
- light.schreibtisch_deko
data: {}
motion_cutoff: 10
illuminance_low_threshold: 10
battery_low_threshold: 20

View File

@@ -0,0 +1,232 @@
blueprint:
name: IKEA MYGGSPRAY E2494 Motion Sensor (Matter) v2.1
description: 'Full-featured automation for the IKEA MYGGSPRAY E2494 Matter motion
sensor. Supports independent actions for motion, illuminance (high/low), and battery
alerts. '
domain: automation
source_url: https://github.com/aledziko/HA-blueprints/blob/main/IKEA/Matter/ikea-myggspray-e2494/ikea-myggspray-e2494-matter-motion-sensor.yaml
author: aledziko
input:
motion_entity:
name: MYGGSPRAY Motion Sensor
description: Select the MYGGSPRAY motion sensor (binary_sensor).
selector:
entity:
filter:
- device_class:
- occupancy
domain:
- binary_sensor
- device_class:
- motion
domain:
- binary_sensor
reorder: false
multiple: false
use_time_window:
name: Enable Active Hours?
description: Restrict automation to a specific time window.
default: false
selector:
boolean: {}
active_start_time:
name: Active Start Time
description: Automation starts working at this time (if enabled).
default: 08:00:00
selector:
time: {}
active_end_time:
name: Active End Time
description: Automation stops working at this time (if enabled).
default: '22:00:00'
selector:
time: {}
no_motion_wait:
name: Wait time (Motion)
description: Time to wait after last motion is detected before running the "off"
action.
default: 120
selector:
number:
min: 0.0
max: 3600.0
unit_of_measurement: seconds
step: 1.0
mode: slider
motion_on_action:
name: 'Action: Motion Detected'
description: Run when motion is detected (and dark enough).
default: []
selector:
action: {}
motion_off_action:
name: 'Action: Motion Stopped'
description: Run after the sensor stops detecting motion and wait time elapsed.
default: []
selector:
action: {}
illuminance_entity:
name: (Optional) Illuminance Sensor
description: Select the light sensor (sensor.illuminance).
default: []
selector:
entity:
filter:
- domain:
- sensor
device_class:
- illuminance
reorder: false
multiple: false
motion_cutoff:
name: (Optional) Motion Light Cutoff
description: Only trigger "Motion Detected" action if LUX is BELOW this value
(0 to disable).
default: 0
selector:
number:
min: 0.0
max: 3000.0
unit_of_measurement: lux
step: 1.0
mode: slider
illuminance_high_threshold:
name: (Optional) Light High Threshold
description: Trigger "High Action" when LUX goes ABOVE this value (e.g. 500
lx).
default: 500
selector:
number:
min: 0.0
max: 3000.0
unit_of_measurement: lux
step: 1.0
mode: slider
high_action:
name: 'Action: Light High'
description: Run when light exceeds threshold (e.g. close curtains).
default: []
selector:
action: {}
illuminance_low_threshold:
name: (Optional) Light Low Threshold
description: Trigger "Low Action" when LUX goes BELOW this value (e.g. 5 lx).
default: 5
selector:
number:
min: 0.0
max: 3000.0
unit_of_measurement: lux
step: 1.0
mode: slider
low_action:
name: 'Action: Light Low'
description: Run when light drops below threshold (e.g. open curtains).
default: []
selector:
action: {}
battery_entity:
name: (Optional) Battery Sensor
description: Select the battery level sensor (sensor.battery).
default: []
selector:
entity:
filter:
- domain:
- sensor
device_class:
- battery
reorder: false
multiple: false
battery_low_threshold:
name: (Optional) Battery Low Level
description: Threshold for battery alert (%).
default: 30
selector:
number:
min: 0.0
max: 100.0
unit_of_measurement: '%'
step: 1.0
mode: slider
battery_low_action:
name: 'Action: Battery Low'
description: Run when battery drops below threshold.
default: []
selector:
action: {}
mode: parallel
max_exceeded: silent
trigger_variables:
motion_entity_input: !input motion_entity
illuminance_entity_input: !input illuminance_entity
motion_cutoff_input: !input motion_cutoff
high_threshold_input: !input illuminance_high_threshold
low_threshold_input: !input illuminance_low_threshold
battery_entity_input: !input battery_entity
battery_threshold_input: !input battery_low_threshold
use_time_window_input: !input use_time_window
triggers:
- trigger: state
entity_id: !input motion_entity
from: 'off'
to: 'on'
id: motion_on
- trigger: state
entity_id: !input motion_entity
from: 'on'
to: 'off'
for:
seconds: !input no_motion_wait
id: motion_off
- trigger: template
value_template: "{{ illuminance_entity_input != none and \n states(illuminance_entity_input)
| is_number and \n states(illuminance_entity_input) | float(0) > high_threshold_input
| float(100000) }}\n"
id: light_high
- trigger: template
value_template: "{{ illuminance_entity_input != none and \n states(illuminance_entity_input)
| is_number and \n states(illuminance_entity_input) | float(100000) < low_threshold_input
| float(-1) }}\n"
id: light_low
- trigger: template
value_template: "{{ battery_entity_input != none and \n states(battery_entity_input)
| is_number and \n states(battery_entity_input) | float(100) < battery_threshold_input
| float(-1) }}\n"
id: battery_low
condition:
- condition: or
conditions:
- condition: template
value_template: '{{ not use_time_window_input }}'
- condition: time
after: !input active_start_time
before: !input active_end_time
actions:
- choose:
- conditions:
- condition: trigger
id: motion_on
sequence:
- delay: 1.5
- condition: template
value_template: "{% set cutoff = motion_cutoff_input | float(0) %} {% if cutoff
== 0 %}\n true\n{% else %}\n {% set lux = states(illuminance_entity_input)
| float(-1) %}\n {{ lux == -1 or lux <= cutoff }}\n{% endif %}\n"
- sequence: !input motion_on_action
- conditions:
- condition: trigger
id: motion_off
sequence: !input motion_off_action
- conditions:
- condition: trigger
id: light_high
sequence: !input high_action
- conditions:
- condition: trigger
id: light_low
sequence: !input low_action
- conditions:
- condition: trigger
id: battery_low
sequence: !input battery_low_action

View File

@@ -72,7 +72,8 @@
{% set waeschetrockner = states('sensor.waschetrockner_leistung') | float %} {% set waeschetrockner = states('sensor.waschetrockner_leistung') | float %}
{% set waschmaschine = states('sensor.waschmaschine_leistung') | float %} {% set waschmaschine = states('sensor.waschmaschine_leistung') | float %}
{% set arcade = states('sensor.arcade_automat_leistung') | float %} {% set arcade = states('sensor.arcade_automat_leistung') | float %}
{{ (total + solar - raumduft - keller - musik - bett - heimkino_sz - deko - schreibtisch - serverraum - heimkino_wz - spieleschrank - kuehlschrank - kaffeemaschine - waeschetrockner - waschmaschine - arcade) | round(1) }} {% set spuelmaschine = states('sensor.spulmaschine_leistung') | float %}
{{ (total + solar - raumduft - keller - musik - bett - heimkino_sz - deko - schreibtisch - serverraum - heimkino_wz - spieleschrank - kuehlschrank - kaffeemaschine - waeschetrockner - waschmaschine - arcade - spuelmaschine) | round(1) }}
device_class: power device_class: power
state_class: measurement state_class: measurement
attributes: attributes: