summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/ham/multi/the_playlist.nix
blob: aa5ce85dc5dfeba5506166cca5240931136a268b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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'] }}'';
        };
      };
    }
  ];
}