nixos-config/configs/pepe/home-assistant/mpd.nix

38 lines
738 B
Nix
Raw Normal View History

2020-04-08 16:43:09 +02:00
{ 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";
};
}
];
};
}