Skip to content

Commit

Permalink
Add changelog, more fields, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sibbl committed Feb 22, 2024
1 parent 8cb3b2c commit 2df3936
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

## 1.7.0

### Added

* Finally there's a changelog
* Allow custom environment variables to Home Assistant Add-On

### Fixed

* Add missing config variables to Home Assistant Add-On
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ Home Assistant related stuff:
If you use `HA_SCREENSHOT_URL_2`, you can also set `ROTATION_2=180`. If there is no `ROTATION_n` set, then `ROTATION` will be used as a fallback.
You can access these additional images by making GET Requests `http://localhost:5000/2`, `http://localhost:5000/3` etc.

To make us of the array feature in the Home Assistant Add-On, you may use `ADDITIONAL_ENV_VARS`. It expects a format like this to set any additional environment variable:

```yaml
- name: "HA_SCREENSHOT_URL_2"
value: "/lovelace/second-page"
- name: "ROTATION_2"
value: "180"
- name: "HA_SCREENSHOT_URL_3"
value: "/lovelace/third-page"
```
To avoid problems, please ensure that the name only contains upper case letters, numbers and underscores. The value field must be a string, so it's better to always put your value (especially numbers) into a `"string"` .
### How to set up the webhook
The webhook setting is to let HA keep track of the battery level of the Kindle, so it can warn you about charging it. You need to do the following:
Expand Down
4 changes: 4 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ options:
SCALING: '1'
GRAYSCALE_DEPTH: '8'
COLOR_MODE: 'GrayScale'
DITHER: false
REMOVE_GAMMA: true
PREFERS_COLOR_SCHEME: 'light'
HA_BATTERY_WEBHOOK: ''
ADDITIONAL_ENV_VARS: []
Expand All @@ -54,6 +56,8 @@ schema:
SCALING: "float"
GRAYSCALE_DEPTH: "int"
COLOR_MODE: "list(GrayScale|TrueColor)?"
DITHER: "bool"
REMOVE_GAMMA: "bool"
PREFERS_COLOR_SCHEME: "list(light|dark)?"
HA_BATTERY_WEBHOOK: "str"
ADDITIONAL_ENV_VARS:
Expand Down
2 changes: 2 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export ROTATION=$(bashio::config 'ROTATION')
export SCALING=$(bashio::config 'SCALING')
export GRAYSCALE_DEPTH=$(bashio::config 'GRAYSCALE_DEPTH')
export COLOR_MODE=$(bashio::config 'COLOR_MODE')
export DITHER=$(bashio::config 'DITHER')
export REMOVE_GAMMA=$(bashio::config 'REMOVE_GAMMA')
export PREFERS_COLOR_SCHEME=$(bashio::config 'PREFERS_COLOR_SCHEME')
export HA_BATTERY_WEBHOOK=$(bashio::config 'HA_BATTERY_WEBHOOK')

Expand Down

0 comments on commit 2df3936

Please sign in to comment.