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

@@ -1,4 +1,8 @@
{
services.home-assistant.extraComponents = [
"broadlink"
"androidtv"
];
services.home-assistant.config = {
# binary_sensor = [
# {
@@ -232,13 +236,51 @@
delay = 5;
}
{
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";
};
choose = [
{
conditions = [
{
condition = "state";
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=";
};
}
];
}
];
}
];
};