changes for esphome

This commit is contained in:
2024-11-09 20:50:03 +01:00
parent c3d40022df
commit b46fed0624
4 changed files with 12 additions and 8 deletions

View File

@@ -1,10 +1,16 @@
{ ... }: { { pkgs, ... }: {
services.avahi = { services.avahi = {
enable = true; enable = true;
reflector = true; reflector = true;
allowInterfaces = [ allowInterfaces = [
"multimedia"
"server" "server"
"lan" "lan"
"smart"
]; ];
}; };
environment.systemPackages = with pkgs; [
nssmdns
];
} }

View File

@@ -150,8 +150,8 @@
entity_id = "light.bedroom_lights"; entity_id = "light.bedroom_lights";
}; };
data = { data = {
brightness_pct = 5; brightness_pct = 15;
color_temp = 450; rgbw_color = [ 255 126 0 255 ];
}; };
} }
]; ];

View File

@@ -4,6 +4,7 @@
"broadlink" "broadlink"
"androidtv" "androidtv"
"samsungtv" "samsungtv"
"apple_tv"
]; ];
services.home-assistant.config = { services.home-assistant.config = {
ios = { ios = {
@@ -48,7 +49,7 @@
friendly_name = "Any multimedia device on"; friendly_name = "Any multimedia device on";
device_class = "connectivity"; device_class = "connectivity";
value_template = '' 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' and states('media_player.fire_tv_firetv_living_cloonar_multimedia') != 'unavailable') or (is_state('binary_sensor.steamdeck', 'on') and (states('sensor.steamdeck_power') | float(default=0) > 5)) %} {% if (states('media_player.living_room') != 'standby' and states('media_player.living_room') != 'off') or is_state('binary_sensor.ps5', 'on') or is_state('binary_sensor.xbox', 'on') or (states('media_player.fire_tv_firetv_living_cloonar_multimedia') != 'off' and states('media_player.fire_tv_firetv_living_cloonar_multimedia') != 'unavailable') or (is_state('binary_sensor.steamdeck', 'on') and (states('sensor.steamdeck_power') | float(default=0) > 5)) %}
on on
{% else %} {% else %}
off off

View File

@@ -7,10 +7,6 @@ let
{ name = "Living Bulb 4"; id = "485519D94A28"; } { name = "Living Bulb 4"; id = "485519D94A28"; }
{ name = "Living Bulb 5"; id = "485519DA6B6A"; } { name = "Living Bulb 5"; id = "485519DA6B6A"; }
{ name = "Living Bulb 6"; id = "485519D9E018"; } { name = "Living Bulb 6"; id = "485519D9E018"; }
{ name = "Bedroom Bulb 1"; id = "485519FBDF20"; }
{ name = "Bedroom Bulb 2"; id = "485519FBE171"; }
{ name = "Bedroom Bulb 3"; id = "485519FBE377"; }
{ name = "Bedroom Bulb 4"; id = "485519FC05C5"; }
]; ];
switches = [ switches = [
@@ -28,6 +24,7 @@ let
in { in {
services.home-assistant.extraComponents = [ services.home-assistant.extraComponents = [
"shelly" "shelly"
"esphome"
]; ];
services.home-assistant.config = { services.home-assistant.config = {