changes to home assistant, docker images, rustdesk relay
This commit is contained in:
@@ -1,34 +1,43 @@
|
||||
{
|
||||
services.home-assistant.extraComponents = [
|
||||
"ping"
|
||||
"broadlink"
|
||||
"androidtv"
|
||||
"samsungtv"
|
||||
];
|
||||
services.home-assistant.config = {
|
||||
# binary_sensor = [
|
||||
# {
|
||||
# name = "ps5_living";
|
||||
# platform = "command_line";
|
||||
# command = "python /var/lib/hass/ps5.py -q -b 10.42.96.176";
|
||||
# device_class = "connectivity";
|
||||
# scan_interval = 5;
|
||||
# }
|
||||
# {
|
||||
# platform = "template";
|
||||
# sensors = {
|
||||
# multimedia_device_on = {
|
||||
# friendly_name = "Any multimedia device on";
|
||||
# device_class = "connectivity";
|
||||
# value_template = ''
|
||||
# {% if is_state('binary_sensor.ps5_living', 'on') or states('media_player.fire_tv_firetv_living_cloonar_com') != 'off' or states('device_tracker.xbox') == 'home' %}
|
||||
# on
|
||||
# {% else %}
|
||||
# off
|
||||
# {% endif %}
|
||||
# '';
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
binary_sensor = [
|
||||
{
|
||||
name = "xbox";
|
||||
platform = "ping";
|
||||
host = "xbox.cloonar.multimedia";
|
||||
count = 1;
|
||||
scan_interval = 2;
|
||||
}
|
||||
{
|
||||
name = "ps5";
|
||||
platform = "ping";
|
||||
host = "ps5.cloonar.multimedia";
|
||||
count = 1;
|
||||
scan_interval = 2;
|
||||
}
|
||||
{
|
||||
platform = "template";
|
||||
sensors = {
|
||||
multimedia_device_on = {
|
||||
friendly_name = "Any multimedia device on";
|
||||
device_class = "connectivity";
|
||||
value_template = ''
|
||||
{% if is_state('binary_sensor.ps5', 'on') or is_state('binary_sensor.xbox', 'on') or states('media_player.fire_tv_firetv_living_cloonar_multimedia') != 'off' %}
|
||||
on
|
||||
{% else %}
|
||||
off
|
||||
{% endif %}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
# "automation tv scene" = {
|
||||
# alias = "auto tv scene";
|
||||
# hide_entity = true;
|
||||
@@ -76,8 +85,8 @@
|
||||
hide_entity = true;
|
||||
trigger = {
|
||||
platform = "state";
|
||||
entity_id = "device-tracker.xbox";
|
||||
to = "home";
|
||||
entity_id = "binary_sensor.xbox";
|
||||
to = "on";
|
||||
};
|
||||
action = [
|
||||
{
|
||||
@@ -89,18 +98,18 @@
|
||||
source = "Xbox";
|
||||
};
|
||||
}
|
||||
{
|
||||
delay = 5;
|
||||
}
|
||||
{
|
||||
service = "denonavr.get_command";
|
||||
target = {
|
||||
entity_id = "media_player.marantz_sr6015";
|
||||
};
|
||||
data = {
|
||||
command = "/goform/formiPhoneAppDirect.xml?PWSTANDBY";
|
||||
};
|
||||
}
|
||||
# {
|
||||
# delay = 5;
|
||||
# }
|
||||
# {
|
||||
# service = "denonavr.get_command";
|
||||
# target = {
|
||||
# entity_id = "media_player.marantz_sr6015";
|
||||
# };
|
||||
# data = {
|
||||
# command = "/goform/formiPhoneAppDirect.xml?PWSTANDBY";
|
||||
# };
|
||||
# }
|
||||
];
|
||||
};
|
||||
"automation firetv on" = {
|
||||
@@ -108,7 +117,7 @@
|
||||
hide_entity = true;
|
||||
trigger = {
|
||||
platform = "state";
|
||||
entity_id = "media_player.fire_tv_firetv_living_cloonar_com";
|
||||
entity_id = "media_player.fire_tv_firetv_living_cloonar_multimedia";
|
||||
from = "off";
|
||||
};
|
||||
action = [
|
||||
@@ -121,52 +130,28 @@
|
||||
command = "/goform/formiPhoneAppDirect.xml?SIMPLAY";
|
||||
};
|
||||
}
|
||||
{
|
||||
delay = 5;
|
||||
}
|
||||
];
|
||||
};
|
||||
"automation ps5 on" = {
|
||||
alias = "ps5 on";
|
||||
hide_entity = true;
|
||||
trigger = {
|
||||
platform = "state";
|
||||
entity_id = "binary_sensor.ps5";
|
||||
to = "on";
|
||||
};
|
||||
action = [
|
||||
{
|
||||
service = "denonavr.get_command";
|
||||
target = {
|
||||
entity_id = "media_player.marantz_sr6015";
|
||||
};
|
||||
data = {
|
||||
command = "/goform/formiPhoneAppDirect.xml?PWSTANDBY";
|
||||
command = "/goform/formiPhoneAppDirect.xml?SIBD";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
# "automation ps5 on" = {
|
||||
# alias = "ps5 on";
|
||||
# hide_entity = true;
|
||||
# trigger = {
|
||||
# platform = "state";
|
||||
# entity_id = "binary_sensor.ps5_living";
|
||||
# to = "on";
|
||||
# };
|
||||
# action = [
|
||||
# {
|
||||
# service = "denonavr.get_command";
|
||||
# target = {
|
||||
# entity_id = "media_player.marantz_sr6015";
|
||||
# };
|
||||
# data = {
|
||||
# command = "/goform/formiPhoneAppDirect.xml?SIBD";
|
||||
# };
|
||||
# }
|
||||
# {
|
||||
# delay = 5;
|
||||
# }
|
||||
# {
|
||||
# service = "denonavr.get_command";
|
||||
# target = {
|
||||
# entity_id = "media_player.marantz_sr6015";
|
||||
# };
|
||||
# data = {
|
||||
# command = "/goform/formiPhoneAppDirect.xml?PWSTANDBY";
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
"automation all multimedia off" = {
|
||||
alias = "all multimedia off";
|
||||
trigger = {
|
||||
@@ -176,18 +161,10 @@
|
||||
};
|
||||
action = [
|
||||
{
|
||||
conditions = [ "{{ states('media_player.android_tv_metz_cloonar_com') != 'off'}}" ];
|
||||
sequence = [
|
||||
{
|
||||
service = "androidtv.adb_command";
|
||||
target = {
|
||||
device_id = "a5e50f268f3a2dbd0741fb8e9ff7f931";
|
||||
};
|
||||
data = {
|
||||
command = "POWER";
|
||||
};
|
||||
}
|
||||
];
|
||||
service = "media_player.turn_off";
|
||||
target = {
|
||||
entity_id = "media_player.android_tv_metz_cloonar_multimedia";
|
||||
};
|
||||
}
|
||||
{
|
||||
service = "denonavr.get_command";
|
||||
@@ -212,47 +189,32 @@
|
||||
conditions = [
|
||||
{
|
||||
condition = "state";
|
||||
entity_id = "media_player.android_tv_metz_cloonar_com";
|
||||
entity_id = "media_player.android_tv_metz_cloonar_multimedia";
|
||||
state = "off";
|
||||
}
|
||||
{
|
||||
condition = "state";
|
||||
entity_id = "media_player.android_tv_metz_cloonar_com";
|
||||
entity_id = "media_player.android_tv_metz_cloonar_multimedia";
|
||||
state = "unavailable";
|
||||
}
|
||||
];
|
||||
};
|
||||
action = [
|
||||
{
|
||||
service = "androidtv.adb_command";
|
||||
target = {
|
||||
device_id = "a5e50f268f3a2dbd0741fb8e9ff7f931";
|
||||
};
|
||||
data = {
|
||||
command = "POWER";
|
||||
};
|
||||
}
|
||||
{
|
||||
delay = 5;
|
||||
}
|
||||
{
|
||||
choose = [
|
||||
{
|
||||
conditions = [
|
||||
{
|
||||
condition = "state";
|
||||
entity_id = "media_player.android_tv_metz_cloonar_com";
|
||||
entity_id = "media_player.android_tv_metz_cloonar_multimedia";
|
||||
state = "off";
|
||||
}
|
||||
];
|
||||
sequence = [
|
||||
{
|
||||
service = "androidtv.adb_command";
|
||||
service = "media_player.turn_on";
|
||||
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";
|
||||
entity_id = "media_player.android_tv_metz_cloonar_multimedia";
|
||||
};
|
||||
}
|
||||
];
|
||||
@@ -261,7 +223,7 @@
|
||||
conditions = [
|
||||
{
|
||||
condition = "state";
|
||||
entity_id = "media_player.android_tv_metz_cloonar_com";
|
||||
entity_id = "media_player.android_tv_metz_cloonar_multimedia";
|
||||
state = "unavailable";
|
||||
}
|
||||
];
|
||||
@@ -269,7 +231,7 @@
|
||||
{
|
||||
service = "remote.send_command";
|
||||
target = {
|
||||
device_id = "46988d2d424728f7355fe12b09e88e0e";
|
||||
entity_id = "remote.rmproplus";
|
||||
};
|
||||
data = {
|
||||
num_repeats = 1;
|
||||
@@ -282,6 +244,18 @@
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
delay = 5;
|
||||
}
|
||||
{
|
||||
service = "androidtv.adb_command";
|
||||
target = {
|
||||
entity_id = "media_player.android_tv_metz_cloonar_multimedia";
|
||||
};
|
||||
data = {
|
||||
command = "adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.mediatek.tvinput%2F.hdmi.HDMIInputService%2FHDMI100004";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
# "automation multimedia input" = {
|
||||
|
||||
Reference in New Issue
Block a user