feat(hass): hide remote if unavailable
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
e46261e140
commit
1148c8edef
1 changed files with 185 additions and 180 deletions
|
@ -2,10 +2,12 @@
|
||||||
caule-themes-src,
|
caule-themes-src,
|
||||||
dracul-ha-src,
|
dracul-ha-src,
|
||||||
material-rounded-theme-src,
|
material-rounded-theme-src,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (lib) singleton;
|
||||||
inherit (pkgs.writers) writeYAML;
|
inherit (pkgs.writers) writeYAML;
|
||||||
in {
|
in {
|
||||||
services.home-assistant = {
|
services.home-assistant = {
|
||||||
|
@ -109,20 +111,18 @@ in {
|
||||||
|
|
||||||
config.template = [
|
config.template = [
|
||||||
{
|
{
|
||||||
sensor = [
|
sensor = singleton {
|
||||||
{
|
|
||||||
name = "Material Rounded Base Color Matt";
|
name = "Material Rounded Base Color Matt";
|
||||||
unique_id = "material_rounded_base_color_matt";
|
unique_id = "material_rounded_base_color_matt";
|
||||||
state = ''{{ states("sensor.pixel_8_accent_color") }}'';
|
state = ''{{ states("sensor.pixel_8_accent_color") }}'';
|
||||||
}
|
};
|
||||||
];
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
lovelaceConfig = {
|
lovelaceConfig = {
|
||||||
title = "Our House";
|
title = "Our House";
|
||||||
views = [
|
# I don't want multiple views
|
||||||
{
|
views = singleton {
|
||||||
path = "home";
|
path = "home";
|
||||||
title = "Home";
|
title = "Home";
|
||||||
cards = [
|
cards = [
|
||||||
|
@ -145,6 +145,12 @@ in {
|
||||||
{
|
{
|
||||||
type = "custom:android-tv-card";
|
type = "custom:android-tv-card";
|
||||||
|
|
||||||
|
visibility = singleton {
|
||||||
|
condition = "state";
|
||||||
|
entity = "remote.onn_4k_streaming_box";
|
||||||
|
state_not = ["unavailable" "unknown"];
|
||||||
|
};
|
||||||
|
|
||||||
media_player_id = "media_player.living_room_speaker";
|
media_player_id = "media_player.living_room_speaker";
|
||||||
keyboard_id = "remote.android_tv_192_168_0_106";
|
keyboard_id = "remote.android_tv_192_168_0_106";
|
||||||
remote_id = "remote.onn_4k_streaming_box";
|
remote_id = "remote.onn_4k_streaming_box";
|
||||||
|
@ -302,8 +308,7 @@ in {
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
};
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config.lovelace.dashboards = {
|
config.lovelace.dashboards = {
|
||||||
|
|
Loading…
Reference in a new issue