2019-10-24 02:20:38 +02:00
|
|
|
{ lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.homeAssistantConfig = {
|
|
|
|
|
2019-12-20 05:54:26 +01:00
|
|
|
group.view_overview.entities = [ "media_player.mpd" ];
|
2019-10-24 02:20:38 +02:00
|
|
|
|
2019-12-20 05:54:26 +01:00
|
|
|
media_player = [{
|
|
|
|
platform = "mpd";
|
|
|
|
host = "localhost";
|
|
|
|
}];
|
2019-10-24 02:20:38 +02:00
|
|
|
|
2019-12-20 05:54:26 +01:00
|
|
|
script.turn_all_off.sequence = [{
|
|
|
|
alias = "turn mpd off";
|
|
|
|
service = "media_player.turn_off";
|
|
|
|
data.entity_id = "media_player.mpd";
|
|
|
|
}];
|
2019-10-24 02:20:38 +02:00
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|