Skip to content

Commit

Permalink
Merge pull request #21 from shevu/develop
Browse files Browse the repository at this point in the history
New option 'navigate_local'
  • Loading branch information
dimagoltsman authored Jan 31, 2023
2 parents 66871e3 + 1fa7af2 commit cbc5bc1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
Expand Down
2 changes: 2 additions & 0 deletions dist/refreshable-picture-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

};
Expand Down

0 comments on commit cbc5bc1

Please sign in to comment.