Rudimentary fullyKiosk support. Still not a replacement for lovelace-fullykiosk

This commit is contained in:
Thomas Lovén 2019-09-14 00:03:57 +02:00
parent fec0d708c9
commit 13f17af309
2 changed files with 19 additions and 4 deletions

View File

@ -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)

View File

@ -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")