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); } };