ma ham: add the_playlist
This commit is contained in:
parent
f795c9ca7f
commit
b8d4d229cb
|
@ -14,6 +14,7 @@ let
|
|||
#flurlicht = import ./multi/flurlicht.nix;
|
||||
kurzzeitwecker = import ./multi/kurzzeitwecker.nix;
|
||||
firetv_restart = import ./multi/firetv_restart.nix;
|
||||
the_playlist = import ./multi/the_playlist.nix;
|
||||
# switch
|
||||
# automation
|
||||
# binary_sensor
|
||||
|
@ -131,6 +132,7 @@ in {
|
|||
# https://www.home-assistant.io/cookbook/automation_for_rainy_days/
|
||||
]
|
||||
++ ((import ./sensor/outside.nix) {inherit lib;})
|
||||
++ the_playlist.sensor
|
||||
++ zigbee.sensor ;
|
||||
frontend = { };
|
||||
# light = flurlicht.light;
|
||||
|
|
26
2configs/ham/multi/the_playlist.nix
Normal file
26
2configs/ham/multi/the_playlist.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
sensor = [
|
||||
{ platform = "rest";
|
||||
name = "pl";
|
||||
resource = "http://prism.r:8001/current";
|
||||
scan_interval = 30;
|
||||
json_attributes = [ "name" "filename" "youtube" ];
|
||||
}
|
||||
{ platform = "template";
|
||||
sensors = {
|
||||
the_playlist_song = {
|
||||
friendly_name = "Current Song";
|
||||
value_template = ''{{ states.sensor.pl.attributes['name'] }}'';
|
||||
};
|
||||
the_playlist_url = {
|
||||
friendly_name = "Song Youtube URL";
|
||||
value_template = ''{{ states.sensor.pl.attributes['youtube'] }}'';
|
||||
};
|
||||
the_playlist_filename = {
|
||||
friendly_name = "Song Filename";
|
||||
value_template = ''{{ states.sensor.pl.attributes['filename'] }}'';
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue