From 13f17af3098e95d5d8041cff73b478e6d94614e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Sat, 14 Sep 2019 00:03:57 +0200 Subject: [PATCH] Rudimentary fullyKiosk support. Still not a replacement for lovelace-fullykiosk --- README.md | 19 ++++++++++++++++++- custom_components/browser_mod/media_player.py | 4 +--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4ba6e97..5aeba9e 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ The `media_player` entity also has some extra attributes presenting the current | `visibility` | Whether the frontend is currently visible on the *device*. | | `userAgent` | The User Agent of the associated browser. | | `currentUser` | The user currently logged in on the *device*. | -| 'blackout' | Whether the view on the *device* is currently blacked out (see below). | +| `blackout` | Whether the view on the *device* is currently blacked out (see below). | **NOTE: Because apple is apple; on iOS you need to touch the screen once after loading the frontend before any playback will work.** @@ -195,6 +195,7 @@ service_data: ``` Remove a blackout. +The optional parameter `brightness` will set the screen brightness of a device running Fully Kiosk Browser to a value between 0 and 255. ### lovelace-reload ``` @@ -220,6 +221,22 @@ The player card also displays the `entityID`. Click it to select, so you can cop ![browser-player](https://user-images.githubusercontent.com/1299821/60288980-a4d07a80-9915-11e9-88ba-e078a3aa24f4.png) +# Fully Kiosk Browser +If you are using a device running [Fully Kiosk Browser](https://www.ozerov.de/fully-kiosk-browser/) (PLUS version only) you will have access to a few more functions. + +First of all the commands `blackout` and `no-blackout` will controll the devices screen directly. +`no-blackout` also has an optional parameter `brightness` that can set the screen brightness between 0 and 255. + +Second, there are a few more attributes available + +| attribute | content | +| --- | --- | +| `fullyKiosk` | True. | +| `brightness` | The current screen brightness. | +| `battery` | The current charge percentage of the devices battery. | +| `charging` | Whether the battery is currently charging. | +| `motion` | Whether the devices camera has detected any motion in the last five seconds. | + # Support [Home Assistant community forum thread](https://community.home-assistant.io/t/browser-mod-turn-your-browser-into-a-controllable-device-and-a-media-player/123806) diff --git a/custom_components/browser_mod/media_player.py b/custom_components/browser_mod/media_player.py index 1bdc676..c826380 100644 --- a/custom_components/browser_mod/media_player.py +++ b/custom_components/browser_mod/media_player.py @@ -48,7 +48,7 @@ class BrowserModPlayer(MediaPlayerDevice, BrowserModEntity): @property def _player_data(self): - return self._ws_data.get("player", {}); + return self._ws_data.get("player", {}) @property def state(self): @@ -90,5 +90,3 @@ class BrowserModPlayer(MediaPlayerDevice, BrowserModEntity): self.ws_send("pause") def media_stop(self): self.ws_send("stop") - -