nixos-config/configs/porani/home-assistant/mpd.nix
Ingolf Wagner 54bab918d7
init
2019-10-24 02:24:33 +02:00

43 lines
788 B
Nix

{ lib, ... }:
{
services.homeAssistantConfig = {
group.view_overview.entities = [
"media_player.mpd"
];
media_player = [
{
platform = "mpd";
host = "localhost";
}
];
script.turn_all_off.sequence = [
{
alias = "turn mpd off";
service = "media_player.turn_off";
data.entity_id = "media_player.mpd";
}
];
script.turn_all_on.sequence = [
{
alias = "turn mpd on";
service = "media_player.turn_on";
data.entity_id = "media_player.mpd";
}
{
alias = "Adjust volume";
service = "media_player.volume_set";
data = {
entity_id = "media_player.mpd";
volume_level = "0.90";
};
}
];
};
}