Merge pull request #181411 from NixOS/home-assistant

home-assistant: 2022.7.3 -> 2022.7.4
This commit is contained in:
Martin Weinelt
2022-07-14 10:51:45 +02:00
committed by GitHub
4 changed files with 24 additions and 24 deletions
+19 -6
View File
@@ -7,8 +7,6 @@ in {
meta.maintainers = lib.teams.home-assistant.members;
nodes.hass = { pkgs, ... }: {
environment.systemPackages = with pkgs; [ mosquitto ];
services.postgresql = {
enable = true;
ensureDatabases = [ "hass" ];
@@ -108,9 +106,7 @@ in {
# Cause a configuration change that requires a service restart as we added a new runtime dependency
specialisation.newFeature = {
inheritParentConfig = true;
configuration.services.home-assistant.config.device_tracker = [
{ platform = "bluetooth_tracker"; }
];
configuration.services.home-assistant.config.esphome = {};
};
};
@@ -119,6 +115,7 @@ in {
in
''
import re
import json
start_all()
@@ -131,7 +128,19 @@ in {
assert match
package = match.group('path')
def get_journal_cursor(host) -> str:
exit, out = host.execute("journalctl -u home-assistant.service -n1 -o json-pretty --output-fields=__CURSOR")
assert exit == 0
return json.loads(out)["__CURSOR"]
def wait_for_homeassistant(host, cursor):
host.wait_until_succeeds(f"journalctl --after-cursor='{cursor}' -u home-assistant.service | grep -q 'Home Assistant initialized in'")
hass.wait_for_unit("home-assistant.service")
cursor = get_journal_cursor(hass)
with subtest("Check that YAML configuration file is in place"):
hass.succeed("test -L ${configDir}/configuration.yaml")
@@ -148,7 +157,7 @@ in {
hass.succeed(f"grep -q 'wake_on_lan' {package}/extra_components")
with subtest("Check that Home Assistant's web interface and API can be reached"):
hass.wait_until_succeeds("journalctl -u home-assistant.service | grep -q 'Home Assistant initialized in'")
wait_for_homeassistant(hass, cursor)
hass.wait_for_open_port(8123)
hass.succeed("curl --fail http://localhost:8123/lovelace")
@@ -162,15 +171,19 @@ in {
with subtest("Check service reloads when configuration changes"):
# store the old pid of the process
pid = hass.succeed("systemctl show --property=MainPID home-assistant.service")
cursor = get_journal_cursor(hass)
hass.succeed("${system}/specialisation/differentName/bin/switch-to-configuration test")
new_pid = hass.succeed("systemctl show --property=MainPID home-assistant.service")
assert pid == new_pid, "The PID of the process should not change between process reloads"
wait_for_homeassistant(hass, cursor)
with subtest("check service restarts when package changes"):
pid = new_pid
cursor = get_journal_cursor(hass)
hass.succeed("${system}/specialisation/newFeature/bin/switch-to-configuration test")
new_pid = hass.succeed("systemctl show --property=MainPID home-assistant.service")
assert pid != new_pid, "The PID of the process shoudl change when the HA binary changes"
wait_for_homeassistant(hass, cursor)
with subtest("Check that no errors were logged"):
output_log = hass.succeed("cat ${configDir}/home-assistant.log")
@@ -17,14 +17,14 @@
buildPythonPackage rec {
pname = "bellows";
version = "0.31.0";
version = "0.31.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "zigpy";
repo = "bellows";
rev = "refs/tags/${version}";
sha256 = "sha256-8pw139TNY7LE7x13JfgxcUVWFIXVj4FiEvqdUh+xcl8=";
sha256 = "sha256-kjZL6N1VF3Rc26eB5fU1UEs9BEr4sfV4Hto6QdwqeqY=";
};
propagatedBuildInputs = [
@@ -2,7 +2,7 @@
# Do not edit!
{
version = "2022.7.3";
version = "2022.7.4";
components = {
"abode" = ps: with ps; [
abodepy
+2 -15
View File
@@ -85,19 +85,6 @@ let
});
})
# Pinned due to API changes in pyruckus>0.12
(self: super: {
pyruckus = super.pyruckus.overridePythonAttrs (oldAttrs: rec {
version = "0.12";
src = fetchFromGitHub {
owner = "gabe565";
repo = "pyruckus";
rev = version;
sha256 = "0ykv6r6blbj3fg9fplk9i7xclkv5d93rwvx0fm5s8ms9f2s9ih8z";
};
});
})
# Pinned due to API changes in 0.1.0
(mkOverride "poolsense" "0.0.8" "sha256-17MHrYRmqkH+1QLtgq2d6zaRtqvb9ju9dvPt9gB2xCc=")
@@ -190,7 +177,7 @@ let
extraPackagesFile = writeText "home-assistant-packages" (lib.concatMapStringsSep "\n" (pkg: pkg.pname) extraBuildInputs);
# Don't forget to run parse-requirements.py after updating
hassVersion = "2022.7.3";
hassVersion = "2022.7.4";
in python.pkgs.buildPythonApplication rec {
pname = "homeassistant";
@@ -208,7 +195,7 @@ in python.pkgs.buildPythonApplication rec {
owner = "home-assistant";
repo = "core";
rev = version;
hash = "sha256-e0vu3QUalFncWloNum92YLvMWkeuFF74vrNdfmsfEw0=";
hash = "sha256-TQsIChMoIlTd8+gN4bxiWFId6V2wB1j3XfhXYpYMw9M=";
};
# leave this in, so users don't have to constantly update their downstream patch handling