change to lights and multimedia home-assistant

This commit is contained in:
2024-02-18 22:39:03 +01:00
parent e6baa25011
commit 57a215fec4
2 changed files with 54 additions and 12 deletions

View File

@@ -129,27 +129,27 @@
]; ];
} }
{ {
conditions = [ "{{ state_attr('sun.sun', 'elevation') < 5 and trigger.entity_id == 'light.kitchen_lights' }}" ]; conditions = [ "{{ state_attr('sun.sun', 'elevation') < 5 and trigger.entity_id == 'light.bedroom_lights' }}" ];
sequence = [ sequence = [
{ {
service = "light.turn_on"; service = "light.turn_on";
target = { target = {
entity_id = "light.kitchen_lights"; entity_id = "light.bedroom_lights";
}; };
data = { data = {
brightness_pct = 30; brightness_pct = 5;
color_temp = 450; color_temp = 450;
}; };
} }
]; ];
} }
{ {
conditions = [ "{{ state_attr('sun.sun', 'elevation') < 5 and state_attr(trigger.entity_id, 'is_deconz_group') != None }}" ]; conditions = [ "{{ state_attr('sun.sun', 'elevation') < 5 and trigger.entity_id == 'light.kitchen_lights' }}" ];
sequence = [ sequence = [
{ {
service = "light.turn_on"; service = "light.turn_on";
target = { target = {
entity_id = "{{ trigger.entity_id }}"; entity_id = "light.kitchen_lights";
}; };
data = { data = {
brightness_pct = 30; brightness_pct = 30;

View File

@@ -1,4 +1,8 @@
{ {
services.home-assistant.extraComponents = [
"broadlink"
"androidtv"
];
services.home-assistant.config = { services.home-assistant.config = {
# binary_sensor = [ # binary_sensor = [
# { # {
@@ -232,13 +236,51 @@
delay = 5; delay = 5;
} }
{ {
service = "androidtv.adb_command"; choose = [
target = { {
device_id = "a5e50f268f3a2dbd0741fb8e9ff7f931"; conditions = [
}; {
data = { condition = "state";
command = "adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.mediatek.tvinput%2F.hdmi.HDMIInputService%2FHDMI100004"; entity_id = "media_player.android_tv_metz_cloonar_com";
}; state = "off";
}
];
sequence = [
{
service = "androidtv.adb_command";
target = {
device_id = "a5e50f268f3a2dbd0741fb8e9ff7f931";
};
data = {
command = "adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.mediatek.tvinput%2F.hdmi.HDMIInputService%2FHDMI100004";
};
}
];
}
{
conditions = [
{
condition = "state";
entity_id = "media_player.android_tv_metz_cloonar_com";
state = "unavailable";
}
];
sequence = [
{
service = "remote.send_command";
target = {
device_id = "46988d2d424728f7355fe12b09e88e0e";
};
data = {
num_repeats = 1;
delay_secs = 0.4;
hold_secs = 0;
command = "b64:JgBOAJaSFREVNRU2FTUVERURFRAVERURFTUVNhU1FREVERUQFREVERUQFTYVNRURFREVEBURFTYVNRURFRAVNhU1FTYVNRUABfmWkhURFQANBQAAAAAAAAAAAAA=";
};
}
];
}
];
} }
]; ];
}; };