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,
|
||||
dracul-ha-src,
|
||||
material-rounded-theme-src,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) singleton;
|
||||
inherit (pkgs.writers) writeYAML;
|
||||
in {
|
||||
services.home-assistant = {
|
||||
|
@ -109,20 +111,18 @@ in {
|
|||
|
||||
config.template = [
|
||||
{
|
||||
sensor = [
|
||||
{
|
||||
sensor = singleton {
|
||||
name = "Material Rounded Base Color Matt";
|
||||
unique_id = "material_rounded_base_color_matt";
|
||||
state = ''{{ states("sensor.pixel_8_accent_color") }}'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
lovelaceConfig = {
|
||||
title = "Our House";
|
||||
views = [
|
||||
{
|
||||
# I don't want multiple views
|
||||
views = singleton {
|
||||
path = "home";
|
||||
title = "Home";
|
||||
cards = [
|
||||
|
@ -145,6 +145,12 @@ in {
|
|||
{
|
||||
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";
|
||||
keyboard_id = "remote.android_tv_192_168_0_106";
|
||||
remote_id = "remote.onn_4k_streaming_box";
|
||||
|
@ -302,8 +308,7 @@ in {
|
|||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
config.lovelace.dashboards = {
|
||||
|
|
Loading…
Reference in a new issue