!QhvgabMQzwEQeWehhZ:lossy.network

NixOS Home Automation

500 Members
Declarative Home Automation and other Sidequests | https://wiki.nixos.org/wiki/Home_Assistant124 Servers

Load older messages


SenderMessageTime
9 Nov 2024
@mfed3:matrix.orgmfed3Thanks, appreciate it04:48:13
@mfed3:matrix.orgmfed3My current version is 2024.10.4, should I just roll back to 2024.10.3? Or is there a version you recommend and know is good05:01:08
@hexa:lossy.network@hexa:lossy.networkcan you provide a config that obviously breaks?05:02:24
@hexa:lossy.network@hexa:lossy.networkideally one that breaks hard05:04:09
@mfed3:matrix.orgmfed3Yea let me find the simplest one that doesn't any extra factors other than the on off true false things going on, some of my automations have a lot of conditions going on05:06:42
@mfed3:matrix.orgmfed3 { config, pkgs, ... }: { services.home-assistant.config.automation = [ { alias = "Iron Auto Off"; trigger = { platform = "state"; entity_id = "switch.sonoff_s31_lite_zb_switch_2"; to = "on"; for = "00:15:00"; }; action = { service = "switch.turn_off"; entity_id = "switch.sonoff_s31_lite_zb_switch_2"; }; } ]; }05:09:46
@hexa:lossy.network@hexa:lossy.networkdoes that fail to validate the config?05:10:15
@mfed3:matrix.orgmfed3 * what's the code block escape I need again05:10:26
@hexa:lossy.network@hexa:lossy.networkthree backticks05:10:34
@hexa:lossy.network@hexa:lossy.network ``` 05:10:45
@mfed3:matrix.orgmfed3
{ config, pkgs, ... }:
{
  services.home-assistant.config.automation = [    
    {
      alias = "Iron Auto Off";
      trigger = {
        platform = "state";
        entity_id = "switch.sonoff_s31_lite_zb_switch_2";
        to = "on";
        for = "00:15:00";
      };
      action = {
        service = "switch.turn_off";
        entity_id = "switch.sonoff_s31_lite_zb_switch_2";
      };
    }
  ];
}
05:10:46
@mfed3:matrix.orgmfed3image.png
Download image.png
05:11:00
@mfed3:matrix.orgmfed3Then what ends up happening is it converts the "on" to true in the automation, but it compiles 05:11:24
@hexa:lossy.network@hexa:lossy.networkhrm05:11:33
@hexa:lossy.network@hexa:lossy.networkI need something that will fail obviously in a nixos test05:11:41
@mfed3:matrix.orgmfed3Ah I see, yea I have like 23 out of 50 automations with this type of issue right now, but 100% of all the nix builds and passes05:13:02
@hexa:lossy.network@hexa:lossy.networkhttps://github.com/NixOS/nixpkgs/pull/35468705:36:03
@niten:fudo.imNiten changed their display name from Peter to Niten.20:30:13
10 Nov 2024
@johnhamelink:matrix.orgjohnhamelinkHi, I just noticed that in the nixos.wiki page for home-assistant, it mentions that the declarative style might not be supported going forward. I just wanted to flag that I'm using it quite successfully. You can see most of my config here - I have quite an extensive config and I do plan on building it out further going forward. I was very much enjoying being able to use nix to split out and organise the home assistant config. https://git.sr.ht/~johnhamelink/nix/tree/master/item/os/hosts/sun/services/home-assistant00:54:07
@crtified:crtified.meCRTified
In reply to @johnhamelink:matrix.org
Hi, I just noticed that in the nixos.wiki page for home-assistant, it mentions that the declarative style might not be supported going forward. I just wanted to flag that I'm using it quite successfully. You can see most of my config here - I have quite an extensive config and I do plan on building it out further going forward. I was very much enjoying being able to use nix to split out and organise the home assistant config. https://git.sr.ht/~johnhamelink/nix/tree/master/item/os/hosts/sun/services/home-assistant
Do you have a declarative way of configuring e.g. the mqtt component, or do you have to enter credentials by yourself in the HA GUI? I didn't spot anything related to mqtt config besides the component definition in your config, so I might have missed it
02:56:30
@crtified:crtified.meCRTified* Do you have a declarative way of configuring e.g. the mqtt integration, or do you have to enter credentials by yourself in the HA GUI? I didn't spot anything related to mqtt config besides the component definition in your config, so I might have missed it02:57:00
@hexa:lossy.network@hexa:lossy.networkmqtt went fully guy02:59:48
@crtified:crtified.meCRTifiedIf not: that's something that used to be possible via YAML (i.e., declarative), and is not possible anymore since 2022.303:02:03
@crtified:crtified.meCRTified
In reply to @hexa:lossy.network
mqtt went fully guy
That's why I explicitly mentioned it, as it's a great example of what's meant with "declarative style might not be supported going forward"
03:02:53
@crtified:crtified.meCRTifiedI just wasn't fast enough with finding the correct version for that03:03:23
@johnhamelink:matrix.orgjohnhamelink
In reply to CRTified
In reply to @johnhamelink:matrix.org
Hi, I just noticed that in the nixos.wiki page for home-assistant, it mentions that the declarative style might not be supported going forward. I just wanted to flag that I'm using it quite successfully. You can see most of my config here - I have quite an extensive config and I do plan on building it out further going forward. I was very much enjoying being able to use nix to split out and organise the home assistant config. https://git.sr.ht/~johnhamelink/nix/tree/master/item/os/hosts/sun/services/home-assistant
Do you have a declarative way of configuring e.g. the mqtt component, or do you have to enter credentials by yourself in the HA GUI? I didn't spot anything related to mqtt config besides the component definition in your config, so I might have missed it
I have mosquitto set up declaratively, including setting up ACL. I think I'm providing the MQTT credentials to HA through the UI though - I don't fully remember as it was one of the first things I did for this config
14:58:36
@johnhamelink:matrix.orgjohnhamelinkWorth noting my config has sections of it - particularly around connectivity & personal info - encrypted using git-crypt15:00:01
@sbc64:matrix.org@sbc64:matrix.org left the room.20:02:04
11 Nov 2024
@ginkogruen:matrix.orgginkogruen joined the room.09:15:20
@signaleleven:signal-eleven.comsignaleleven joined the room.14:50:09

Show newer messages


Back to Room ListRoom Version: 6