From 1fa7af2dd0f861eea2388b6290c4836bda1cae34 Mon Sep 17 00:00:00 2001 From: Mariusz Date: Tue, 4 Oct 2022 10:23:27 +0200 Subject: [PATCH] Add files via upload New option 'navigate_local' --- README.md | 8 ++++++++ dist/refreshable-picture-card.js | 2 ++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index d71ec12..05b4a32 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,15 @@ update_interval: 1 static_picture: http://192.168.1.174/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=someString&user=username&password=password navigate: https://github.com/dimagoltsman/refreshable-picture-card/ ``` +navigate_local example (onclick, change local/lovelace tab): +``` +type: 'custom:refreshable-picture-card' +title: Reolink Camera +update_interval: 1 +static_picture: http://192.168.1.174/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=someString&user=username&password=password +navigate_local: camera +``` # you are also welcome to contribute # diff --git a/dist/refreshable-picture-card.js b/dist/refreshable-picture-card.js index 7bbcd8e..1722197 100755 --- a/dist/refreshable-picture-card.js +++ b/dist/refreshable-picture-card.js @@ -94,6 +94,8 @@ class ResfeshablePictureCard extends HTMLElement { ); }else if(config.navigate){ window.open(config.navigate); + }else if(config.navigate_local){ + window.location.assign(config.navigate_local); } };