Adoption of various Thread/Matter devices

This commit is contained in:
2026-01-22 07:30:19 +01:00
parent 2ff40a0da7
commit e07c66563c
3 changed files with 648 additions and 74 deletions

View File

@@ -30,15 +30,6 @@
data:
transition: 2
mode: single
- id: '1623350724195'
alias: Zonenbenachrichtigung
description: 'Debug: Präsenzerkennung'
use_blueprint:
path: homeassistant/notify_leaving_zone.yaml
input:
person_entity: person.marcus_scholz
zone_entity: zone.home
notify_device: 773450cae5e93524731940ad081846d9
- id: '1623526683767'
alias: Licht bei Sonnenaufgang ausschalten
description: ''
@@ -94,25 +85,6 @@
- data:
message: Gute Nacht!
action: notify.mobile_app_le2123
- data:
media:
media_content_id: media-source://tts/tts.piper?message=Gute+Nacht%2C+schlaf+gut.
media_content_type: provider
metadata:
title: Gute Nacht, schlaf gut.
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: media-source://tts/tts.piper?message=Gute+Nacht%2C+schlaf+gut.
action: media_player.play_media
enabled: true
target:
entity_id: media_player.home_assistant_voice_09c0e7_media_player
- data:
media:
media_content_id: media-source://tts/tts.piper?message=Gute+Nacht%2C+schlaf+gut.
@@ -132,25 +104,6 @@
enabled: true
target:
entity_id: media_player.m5stack_atom_echo
- target:
entity_id: media_player.raspiaudio_muse_luxe
data:
media:
media_content_id: media-source://tts/tts.piper?message=Gute+Nacht%2C+schlaf+gut.
media_content_type: provider
metadata:
title: Gute Nacht, schlaf gut.
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: media-source://tts/tts.piper?message=Gute+Nacht%2C+schlaf+gut.
action: media_player.play_media
enabled: true
- target:
area_id:
- wohnzimmer
@@ -162,9 +115,8 @@
target:
device_id:
- 1f3c4b5de4aea99bac83688ceb22293b
- 48dafb7f4a8ed6ccbb046758cb660c23
- c4ead7f6227e2ee4c43c4b0df829cd84
enabled: false
enabled: true
mode: single
- id: '1623868115464'
alias: 420!
@@ -239,7 +191,8 @@
entity_id:
- event.sleep_as_android_benutzerbenachrichtigung
attribute: event_type
to: time_to_bed_alarm_alert
to:
- time_to_bed_alarm_alert
conditions:
- condition: state
entity_id: person.marcus_scholz
@@ -251,7 +204,7 @@
action: light.turn_on
- data:
cache: true
media_player_entity_id: media_player.raspiaudio_muse_luxe
media_player_entity_id: media_player.home_assistant_voice_0a7c6b
message: Ab ins Bett, Schlafenszeit.
target:
entity_id: tts.piper
@@ -571,7 +524,7 @@
actions:
- data:
cache: true
media_player_entity_id: media_player.raspiaudio_muse_luxe
media_player_entity_id: media_player.home_assistant_voice_0a7c6b_media_player
message: '{{message}}
'
@@ -614,18 +567,6 @@
'
mode: single
- id: '1683370485273'
alias: TTS Benachrichtigung an ein Smartphone senden
trigger: []
condition: []
action:
- service: notify.mobile_app_le2123
data:
message: TTS
data:
tts_text: Dies ist ein Beispiel für eine Text-zu-Sprache Benachrichtigung
auf dem Handy.
mode: single
- id: '1683371750405'
alias: Fenster schließen, wenn es warm wird
description: Tagsüber im Sommer, wenn die Außentemperatur sich der Innentemperatur
@@ -1273,8 +1214,8 @@
sequence:
- data:
data:
push:
interruption-level: time-sensitive
ttl: 0
priority: high
message: Jemand hat an der Haustür geklingelt
title: Türklingel (außen)
action: notify.alle_mobilen_gerate
@@ -1285,18 +1226,90 @@
sequence:
- data:
data:
push:
interruption-level: time-sensitive
ttl: 0
priority: high
message: Jemand hat an der Wohnungstür geklingelt
title: Türklingel (innen)
action: notify.alle_mobilen_gerate
mode: single
- id: '1757574193367'
alias: Zone Notification
- id: '1767373636810'
alias: IKEA Bilresa Scroll Wheel Kinderzimmer
description: ''
use_blueprint:
path: homeassistant/notify_leaving_zone.yaml
path: jhol-byte/Ikea_bilresa_scroll_wheel.yaml
input:
person_entity: person.marcus_scholz
zone_entity: zone.home
notify_device: 773450cae5e93524731940ad081846d9
remote: 2197b753ff6e9bed3f8fb7f37fc434b3
click_action_ch1:
- type: toggle
device_id: cdc33c408194cf51c106cdee7c6c40b7
entity_id: d4fafbbb3b30a00745ab60222f21383b
domain: light
scroll_wheel_target_ch1:
- light.kajplats_e27_ws_globe_470lm
scroll_wheel_mode_ch1: 'lights: dim'
click_action_ch2:
- action: media_player.media_play_pause
metadata: {}
target:
entity_id: media_player.4k_google_tv_box_2
data: {}
scroll_wheel_target_ch2:
- media_player.4k_google_tv_box_2
scroll_wheel_mode_ch2: 'media: volume control'
click_action_ch3:
- action: light.toggle
metadata: {}
target:
entity_id: light.kinderzimmer_deckenlicht
data: {}
on_hold_action_ch1:
- action: script.light_color_temp_helper
metadata: {}
data:
min_color_temp: 2200
max_color_temp: 5000
color_temp_step: 300
mode: cycle
target_light: light.kajplats_e27_ws_globe_470lm
long_click_action_ch2:
- action: media_player.toggle
metadata: {}
data: {}
long_click_action_ch1:
- action: light.turn_on
metadata: {}
target:
entity_id: light.kajplats_e27_ws_globe_470lm
data: {}
- id: '1768844444161'
alias: 'AVR: Nachtruhe'
description: ''
triggers:
- trigger: time
at: '22:00:00'
conditions: []
actions:
- action: media_player.volume_set
metadata: {}
target:
entity_id: media_player.wohnzimmer_2
data:
volume_level: 0.47
- type: turn_off
device_id: 81d56cc472abaec2a02702def5f9cf66
entity_id: a57a56132635ff48a6d2ae8df322b385
domain: switch
mode: single
- id: '1768845192543'
alias: 'AVR: Extra Bass wieder einschalten'
description: ''
triggers:
- trigger: time
at: 08:00:00
conditions: []
actions:
- type: turn_on
device_id: 81d56cc472abaec2a02702def5f9cf66
entity_id: a57a56132635ff48a6d2ae8df322b385
domain: switch
mode: single

View File

@@ -0,0 +1,506 @@
blueprint:
name: Ikea_bilresa_scroll_wheel
description: 'Blueprint for Ikea Bilresa (button and scroll wheel for 3 different
channels)
Version: 2025-01-01
'
domain: automation
input:
remote:
name: Remote
description: Ikea Bilresa scroll wheel remote control
selector:
device:
multiple: false
channel1_section:
name: Channel 1
collapsed: true
input:
click_action_ch1:
name: 'Channel 1: <click> action'
default: []
selector:
action: {}
double_click_action_ch1:
name: 'Channel 1: <double-click> action'
default: []
selector:
action: {}
long_click_action_ch1:
name: 'Channel 1: <long-click> action'
description: ''
default: []
selector:
action: {}
on_hold_action_ch1:
name: 'Channel 1: <on-hold> action'
description: repeat action until button is released, see also on_hold_delay
default: []
selector:
action: {}
scroll_wheel_target_ch1:
name: 'Channel 1: Scroll wheel target entity'
description: Light or media player to be controlled by scroll wheel for
channel 1
selector:
entity:
multiple: true
filter:
- domain:
- light
- media_player
reorder: false
default: []
scroll_wheel_mode_ch1:
selector:
select:
options:
- 'lights: dim'
- 'lights: color temp and color hue'
- 'lights: color temp only'
- 'lights: color hue only'
- 'media: volume control'
custom_value: false
sort: false
multiple: false
default: dim_only
name: 'Channel 1: Scroll wheel mode'
description: Select attribute of target entity controlled by scroll wheel
channel2_section:
name: Channel 2
collapsed: true
input:
click_action_ch2:
name: 'Channel 2: <click> action'
default: []
selector:
action: {}
double_click_action_ch2:
name: 'Channel 2: <double-click> action'
default: []
selector:
action: {}
long_click_action_ch2:
name: 'Channel 2: <long-click> action'
description: ''
default: []
selector:
action: {}
on_hold_action_ch2:
name: 'Channel 2: <on-hold> action'
description: repeat action until button is released, see also on_hold_delay
default: []
selector:
action: {}
scroll_wheel_target_ch2:
name: 'Channel 2: Scroll wheel target entity'
description: Light or media player to be controlled by scroll wheel for
channel 2
selector:
entity:
multiple: true
filter:
- domain:
- light
- media_player
reorder: false
default: []
scroll_wheel_mode_ch2:
selector:
select:
options:
- 'lights: dim'
- 'lights: color temp and color hue'
- 'lights: color temp only'
- 'lights: color hue only'
- 'media: volume control'
custom_value: false
sort: false
multiple: false
default: dim_only
name: 'Channel 2: Scroll wheel mode'
description: Select attribute of target entity controlled by scroll wheel
channel3_section:
name: Channel 3
collapsed: true
input:
click_action_ch3:
name: 'Channel 3: <click> action'
default: []
selector:
action: {}
double_click_action_ch3:
name: 'Channel 3: <double-click> action'
default: []
selector:
action: {}
long_click_action_ch3:
name: 'Channel 3: <long-click> action'
description: ''
default: []
selector:
action: {}
on_hold_action_ch3:
name: 'Channel 3: <on-hold> action'
description: repeat action until button is released, see also on_hold_delay
default: []
selector:
action: {}
scroll_wheel_target_ch3:
name: 'Channel 3: Scroll wheel target entity'
description: Light or media player to be controlled by scroll wheel for
channel 3
selector:
entity:
multiple: true
filter:
- domain:
- light
- media_player
reorder: false
default: []
scroll_wheel_mode_ch3:
selector:
select:
options:
- 'lights: dim'
- 'lights: color temp and color hue'
- 'lights: color temp only'
- 'lights: color hue only'
- 'media: volume control'
custom_value: false
sort: false
multiple: false
default: dim_only
name: 'Channel 3: Scroll wheel mode'
description: Select attribute of target entity controlled by scroll wheel
global_section:
name: Global settings
collapsed: true
input:
dim_step_pct:
name: Dimmer step percentage
description: change in brightness in %
default: 5
selector:
number:
mode: box
step: 1.0
dim_min_pct:
name: Minimum brightness
description: minimum brightness in %
default: 5
selector:
number:
mode: box
step: 1.0
min_color_temp:
name: Minimum color temperature
description: minimum color temperature in K (for color_mode = color_temp)
default: 2200
selector:
number:
mode: box
step: 1.0
max_color_temp:
name: Maximum color temperature
description: maximum color temperature in K (for color_mode = color_temp)
default: 4000
selector:
number:
mode: box
step: 1.0
color_temp_step:
name: Color temperature step
description: change in color temperature in K (for color_mode = color_temp)
default: 100
selector:
number:
mode: box
step: 1.0
color_hue_step:
name: Color hue step
description: change in color hue in degree (0..360) (for color_mode = color_hue)
default: 4
selector:
number:
mode: box
step: 1.0
color_saturation:
name: Color saturation
description: color saturation in % (for color_mode = color_hue)
default: 100
selector:
number:
mode: box
step: 1.0
on_hold_delay:
name: On hold delay
description: delay between separate action calls while on hold button
default: 0.1
selector:
number:
mode: box
step: 0.1
volume_step_pct:
name: Media player volume step percentage
description: change in volume in %
default: 2
selector:
number:
mode: box
step: 1.0
volume_max_pct:
name: Media player max volume percentage
description: max volume in %
default: 50
selector:
number:
mode: box
step: 1.0
source_url: https://gist.github.com/jhol-byte/b2731a4d2476f530d76b9ff409f7f3a4
alias: Ikea_bilresa_scroll_wheel
trigger:
- event_type: state_changed
event_data:
entity_id: '{{ var_button_ch1 }}'
trigger: event
id: button_ch1
- event_type: state_changed
event_data:
entity_id: '{{ var_scroll_left_ch1 }}'
trigger: event
id: scroll_left_ch1
- event_type: state_changed
event_data:
entity_id: '{{ var_scroll_right_ch1 }}'
trigger: event
id: scroll_right_ch1
- event_type: state_changed
event_data:
entity_id: '{{ var_button_ch2 }}'
trigger: event
id: button_ch2
- event_type: state_changed
event_data:
entity_id: '{{ var_scroll_left_ch2 }}'
trigger: event
id: scroll_left_ch2
- event_type: state_changed
event_data:
entity_id: '{{ var_scroll_right_ch2 }}'
trigger: event
id: scroll_right_ch2
- event_type: state_changed
event_data:
entity_id: '{{ var_button_ch3 }}'
trigger: event
id: button_ch3
- event_type: state_changed
event_data:
entity_id: '{{ var_scroll_left_ch3 }}'
trigger: event
id: scroll_left_ch3
- event_type: state_changed
event_data:
entity_id: '{{ var_scroll_right_ch3 }}'
trigger: event
id: scroll_right_ch3
condition:
- condition: template
value_template: "{{ trigger.event.data.old_state.state != 'unavailable' \n and
trigger.event.data.new_state.state != 'unavailable'\n}}"
action:
- variables:
channel: "{% if trigger.id in ['button_ch1', 'scroll_left_ch1', 'scroll_right_ch1']
%}\n ch1\n{% elif trigger.id in ['button_ch2', 'scroll_left_ch2', 'scroll_right_ch2']
%}\n ch2\n{% elif trigger.id in ['button_ch3', 'scroll_left_ch3', 'scroll_right_ch3']
%}\n ch3\n{% endif %}"
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.id == (''button_'' ~ channel) and trigger.event.data.new_state.attributes.event_type
== ''multi_press_1'' }}
'
sequence:
- if: '{{ channel == ''ch1''}}'
then: !input click_action_ch1
- if: '{{ channel == ''ch2''}}'
then: !input click_action_ch2
- if: '{{ channel == ''ch3''}}'
then: !input click_action_ch3
- conditions:
- condition: template
value_template: '{{ trigger.id == (''button_'' ~ channel) and trigger.event.data.new_state.attributes.event_type
== ''multi_press_2'' }}
'
sequence:
- if: '{{ channel == ''ch1''}}'
then: !input double_click_action_ch1
- if: '{{ channel == ''ch2''}}'
then: !input double_click_action_ch2
- if: '{{ channel == ''ch3''}}'
then: !input double_click_action_ch3
- conditions:
- condition: template
value_template: '{{ trigger.id == (''button_'' ~ channel) and trigger.event.data.new_state.attributes.event_type
== ''long_press'' }}
'
sequence:
- if: '{{ channel == ''ch1''}}'
then:
sequence:
- sequence: !input long_click_action_ch1
- repeat:
while: '{{ repeat.index < 100 and state_attr(var_button_ch1, ''event_type'')
== ''long_press'' }}'
sequence:
- sequence: !input on_hold_action_ch1
- delay: '{{ var_on_hold_delay }}'
- if: '{{ channel == ''ch2''}}'
then:
sequence:
- sequence: !input long_click_action_ch2
- repeat:
while: '{{ repeat.index < 100 and state_attr(var_button_ch2, ''event_type'')
== ''long_press'' }}'
sequence:
- sequence: !input on_hold_action_ch2
- delay: '{{ var_on_hold_delay }}'
- if: '{{ channel == ''ch3''}}'
then:
sequence:
- sequence: !input long_click_action_ch3
- repeat:
while: '{{ repeat.index < 100 and state_attr(var_button_ch3, ''event_type'')
== ''long_press'' }}'
sequence:
- sequence: !input on_hold_action_ch3
- delay: '{{ var_on_hold_delay }}'
- conditions:
- condition: template
value_template: '{{ trigger.id == (''scroll_left_'' ~ channel) or trigger.id
== (''scroll_right_'' ~ channel) }}
'
sequence:
- repeat:
for_each: '{{ vars[''targets_entities_'' ~ channel] }}'
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ vars[''scroll_wheel_mode_'' ~ channel] == ''lights:
dim''}}'
sequence:
- if:
- condition: template
value_template: '{{ is_state(repeat.item, ''on'') }}'
then:
- action: light.turn_on
target:
entity_id: '{{ repeat.item }}'
data:
brightness_step_pct: "{{ iif(trigger.id == 'scroll_right_' ~ channel,
trigger.event.data.new_state.attributes.totalNumberOfPressesCounted
* var_dim_step_pct, -1*([trigger.event.data.new_state.attributes.totalNumberOfPressesCounted
* var_dim_step_pct, state_attr(repeat.item, 'brightness')*100/254\n
- var_min_pct]|min)) \n}}"
transition: 0.1
- conditions:
- condition: template
value_template: '{{ vars[''scroll_wheel_mode_'' ~ channel] == ''lights:
color temp only'' or (vars[''scroll_wheel_mode_'' ~ channel] == ''lights:
color temp and color hue'' and state_attr(repeat.item, ''color_temp_kelvin'')
is not none ) }}'
sequence:
- action: script.light_color_temp_helper
data:
mode: '{{ iif(trigger.id == ''scroll_left_'' ~ channel, ''down'',
''up'') }}'
min_color_temp: '{{ var_min_color_temp }}'
max_color_temp: '{{ var_max_color_temp }}'
color_temp_step: '{{ var_color_temp_step * trigger.event.data.new_state.attributes.totalNumberOfPressesCounted
}}'
target_light: '{{ repeat.item }}'
- conditions:
- condition: template
value_template: '{{ vars[''scroll_wheel_mode_'' ~ channel] == ''lights:
color hue only'' or (vars[''scroll_wheel_mode_'' ~ channel] == ''lights:
color temp and color hue'' and state_attr(repeat.item, ''color_temp_kelvin'')
is none ) }}'
sequence:
- action: script.light_color_hs_helper
data:
target_light: '{{ repeat.item }}'
color_hue_step: '{{ var_color_hue_step * trigger.event.data.new_state.attributes.totalNumberOfPressesCounted
}}'
color_saturation: '{{ var_color_saturation }}'
mode: '{{ iif(trigger.id == ''scroll_left_'' ~ channel, ''down'',
''up'') }}'
- conditions:
- condition: template
value_template: '{{ vars[''scroll_wheel_mode_'' ~ channel] == ''media:
volume control'' and is_state(repeat.item, ''playing'')}}'
sequence:
- action: media_player.volume_set
target:
entity_id: '{{ repeat.item }}'
data:
volume_level: "{{ [[state_attr(repeat.item, 'volume_level')*100 +
\n iif(trigger.id == 'scroll_right_' ~ channel, +1, -1)* trigger.event.data.new_state.attributes.totalNumberOfPressesCounted
* var_volume_step_pct, var_volume_max_pct] | min, 0] | max / 100\n}}"
mode: single
max_exceeded: silent
variables:
vars:
targets_entities_ch1: !input scroll_wheel_target_ch1
targets_entities_ch2: !input scroll_wheel_target_ch2
targets_entities_ch3: !input scroll_wheel_target_ch3
scroll_wheel_mode_ch1: !input scroll_wheel_mode_ch1
scroll_wheel_mode_ch2: !input scroll_wheel_mode_ch2
scroll_wheel_mode_ch3: !input scroll_wheel_mode_ch3
var_min_pct: !input dim_min_pct
var_dim_step_pct: !input dim_step_pct
var_color_hue_step: !input color_hue_step
var_color_saturation: !input color_saturation
var_min_color_temp: !input min_color_temp
var_max_color_temp: !input max_color_temp
var_color_temp_step: !input color_temp_step
var_on_hold_delay: !input on_hold_delay
var_volume_step_pct: !input volume_step_pct
var_volume_max_pct: !input volume_max_pct
trigger_variables:
var_remote: !input remote
var_button_ch1: "{% for item in device_entities(var_remote) %} {% set match = item
| regex_findall(find='^event\\..+[a-zA-Z]_3.*$') %} {% if (match | length) > 0
%}\n {{ match[0] }}\n{% endif %} {% endfor %}"
var_scroll_left_ch1: "{% for item in device_entities(var_remote) %} {% set match
= item | regex_findall(find='^event\\..+[a-zA-Z]_2.*$') %} {% if (match | length)
> 0 %}\n {{ match[0] }}\n{% endif %} {% endfor %}"
var_scroll_right_ch1: "{% for item in device_entities(var_remote) %} {% set match
= item | regex_findall(find='^event\\..+[a-zA-Z]_1.*$') %} {% if (match | length)
> 0 %}\n {{ match[0] }}\n{% endif %} {% endfor %}"
var_button_ch2: "{% for item in device_entities(var_remote) %} {% set match = item
| regex_findall(find='^event\\..+[a-zA-Z]_6.*$') %} {% if (match | length) > 0
%}\n {{ match[0] }}\n{% endif %} {% endfor %}"
var_scroll_left_ch2: "{% for item in device_entities(var_remote) %} {% set match
= item | regex_findall(find='^event\\..+[a-zA-Z]_5.*$') %} {% if (match | length)
> 0 %}\n {{ match[0] }}\n{% endif %} {% endfor %}"
var_scroll_right_ch2: "{% for item in device_entities(var_remote) %} {% set match
= item | regex_findall(find='^event\\..+[a-zA-Z]_4.*$') %} {% if (match | length)
> 0 %}\n {{ match[0] }}\n{% endif %} {% endfor %}"
var_button_ch3: "{% for item in device_entities(var_remote) %} {% set match = item
| regex_findall(find='^event\\..+[a-zA-Z]_9.*$') %} {% if (match | length) > 0
%}\n {{ match[0] }}\n{% endif %} {% endfor %}"
var_scroll_left_ch3: "{% for item in device_entities(var_remote) %} {% set match
= item | regex_findall(find='^event\\..+[a-zA-Z]_8.*$') %} {% if (match | length)
> 0 %}\n {{ match[0] }}\n{% endif %} {% endfor %}"
var_scroll_right_ch3: "{% for item in device_entities(var_remote) %} {% set match
= item | regex_findall(find='^event\\..+[a-zA-Z]_7.*$') %} {% if (match | length)
> 0 %}\n {{ match[0] }}\n{% endif %} {% endfor %}"

View File

@@ -114,3 +114,58 @@ wled_wohnzimmer_nachster_effekt:
}}'
mode: single
icon: mdi:firework
light_color_temp_helper:
sequence:
- action: light.turn_on
target:
entity_id: '{{ target_light }}'
data:
color_temp_kelvin: "{% if state_attr(target_light, 'color_temp_kelvin') is none
%} \n {{ max_color_temp }} \n{% else %} \n {% if mode == \"cycle\" and
state_attr(target_light, 'color_temp_kelvin')\n == max_color_temp %}\n {{min_color_temp}}\n
\ {% else %} \n {% set new_value = state_attr(target_light, 'color_temp_kelvin')+iif(mode
== \"down\", -1, +1) * color_temp_step %}\n {{ [([new_value, max_color_temp]
| min), min_color_temp] | max}} \n {% endif %} \n{% endif %} "
alias: light_color_temp_helper
fields:
target_light:
name: Light
description: Light entity
selector:
entity:
filter:
domain: light
required: true
min_color_temp:
name: Minimal color temperature
default: 2200
selector:
number:
mode: box
required: true
max_color_temp:
name: Maximal color temperature
default: 4000
selector:
number:
mode: box
required: true
color_temp_step:
name: Change of color temperature per step
default: 300
selector:
number:
mode: box
required: true
mode:
selector:
select:
options:
- up
- down
- cycle
required: true
default: cycle
name: Mode
description: Select switch mode
description: Switch color temperature of light in steps