Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #13 from luci-11/luci-11-patch-1
Browse files Browse the repository at this point in the history
README update: Add addon start on demand
  • Loading branch information
jeroenterheerdt authored Jun 10, 2020
2 parents f87cb3b + da0a9d8 commit f298056
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions ring_hassio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,36 @@ In order to use the `snapshot` service, you will need to following settings in y
entity_id: [entityID]
filename: tmp/foo.jpg
```

## Battery conservation
A workaround to start/stop streaming (and avoid quick discharge) in Hassio is to start the addon on demand.
To do this:

```yaml
sensor:
- platform: rest
resource: "http://hassio.local:port/api/hassio/addons/xxxxxxxx_ringlivestream/info"
headers:
Authorization: "Bearer [Long_Lived_Access_Token]"
Content-Type: application/json
name: ring_addon_state
value_template: "{{value_json['data']['state']}}"
switch:
- platform: template
switches:
ring_live_stream:
value_template: "{{ is_state('sensor.ring_addon_state', 'started') }}"
turn_on:
service: hassio.addon_start
data:
addon: xxxxxxxx_ringlivestream
turn_off:
service: hassio.addon_stop
data:
addon: xxxxxxxx_ringlivestream
```
To get the 8 chars code "xxxxxxxx_ringlivestream" open the addon page and check the URL bar.

[patreon-shield]: https://frenck.dev/wp-content/uploads/2019/12/patreon.png
[patreon]: https://www.patreon.com/dutchdatadude

0 comments on commit f298056

Please sign in to comment.