mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-21 08:59:20 +03:00
home-assistant: 0.75.2 -> 0.76.1
Also simplify the way overrides are defined for better readability and use the opportunity to introduce a packageOverrides option.
This commit is contained in:
parent
41c13780cb
commit
33be3c4630
5 changed files with 66 additions and 58 deletions
|
@ -2,7 +2,8 @@ import ./make-test.nix ({ pkgs, ... }:
|
|||
|
||||
let
|
||||
configDir = "/var/lib/foobar";
|
||||
apiPassword = "secret";
|
||||
apiPassword = "some_secret";
|
||||
mqttPassword = "another_secret";
|
||||
|
||||
in {
|
||||
name = "home-assistant";
|
||||
|
@ -33,7 +34,9 @@ in {
|
|||
};
|
||||
frontend = { };
|
||||
http.api_password = apiPassword;
|
||||
mqtt = { }; # Use hbmqtt as broker
|
||||
mqtt = { # Use hbmqtt as broker
|
||||
password = mqttPassword;
|
||||
};
|
||||
binary_sensor = [
|
||||
{
|
||||
platform = "mqtt";
|
||||
|
@ -62,7 +65,7 @@ in {
|
|||
|
||||
# Toggle a binary sensor using MQTT
|
||||
$hass->succeed("curl http://localhost:8123/api/states/binary_sensor.mqtt_binary_sensor -H 'x-ha-access: ${apiPassword}' | grep -qF '\"state\": \"off\"'");
|
||||
$hass->waitUntilSucceeds("mosquitto_pub -V mqttv311 -t home-assistant/test -u homeassistant -P '${apiPassword}' -m let_there_be_light");
|
||||
$hass->waitUntilSucceeds("mosquitto_pub -V mqttv311 -t home-assistant/test -u homeassistant -P '${mqttPassword}' -m let_there_be_light");
|
||||
$hass->succeed("curl http://localhost:8123/api/states/binary_sensor.mqtt_binary_sensor -H 'x-ha-access: ${apiPassword}' | grep -qF '\"state\": \"on\"'");
|
||||
|
||||
# Print log to ease debugging
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue