diff options
author | makefu <github@syntax-fehler.de> | 2020-04-19 21:24:52 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2020-04-19 21:24:52 +0200 |
commit | b8d4d229cbba17487076834c9c30c6ef4198ede4 (patch) | |
tree | 6084aeceed1986090f64c2a940f6885475f816ea /2configs/ham/multi | |
parent | f795c9ca7f65b9b003ce0bf84f35a56f419d8473 (diff) |
ma ham: add the_playlist
Diffstat (limited to '2configs/ham/multi')
-rw-r--r-- | 2configs/ham/multi/the_playlist.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/2configs/ham/multi/the_playlist.nix b/2configs/ham/multi/the_playlist.nix new file mode 100644 index 000000000..aa5ce85dc --- /dev/null +++ b/2configs/ham/multi/the_playlist.nix @@ -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'] }}''; + }; + }; + } + ]; +} |