Fork sync
This commit is contained in:
commit
10c18e9854
@ -40,6 +40,8 @@ browser_mod:
|
||||
|
||||
# Usage
|
||||
|
||||
Here's a fantastic video summary of all `browser_mod` functions by Pinkywafer: [Youtube link](https://www.youtube.com/watch?v=atpIP2RYldA).
|
||||
|
||||
## Devices
|
||||
The most important concept of `browser_mod` is the *device*.
|
||||
|
||||
|
@ -33,7 +33,7 @@ async def async_setup(hass, config):
|
||||
|
||||
await setup_connection(hass, config)
|
||||
|
||||
setup_service(hass)
|
||||
await setup_service(hass)
|
||||
|
||||
return True
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@ import logging
|
||||
from datetime import datetime
|
||||
|
||||
from homeassistant.const import STATE_UNAVAILABLE, STATE_ON, STATE_OFF
|
||||
from homeassistant.components.light import Light, SUPPORT_BRIGHTNESS
|
||||
from homeassistant.components.light import LightEntity, SUPPORT_BRIGHTNESS
|
||||
|
||||
from .helpers import setup_platform, BrowserModEntity
|
||||
|
||||
@ -11,7 +11,7 @@ PLATFORM = 'light'
|
||||
async def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
||||
return setup_platform(hass, config, async_add_devices, PLATFORM, BrowserModLight)
|
||||
|
||||
class BrowserModLight(Light, BrowserModEntity):
|
||||
class BrowserModLight(LightEntity, BrowserModEntity):
|
||||
domain = PLATFORM
|
||||
|
||||
def __init__(self, hass, connection, deviceID, alias=None):
|
||||
|
@ -3,7 +3,7 @@ from homeassistant.components.media_player import (
|
||||
SUPPORT_PLAY, SUPPORT_PLAY_MEDIA,
|
||||
SUPPORT_PAUSE, SUPPORT_STOP,
|
||||
SUPPORT_VOLUME_SET, SUPPORT_VOLUME_MUTE,
|
||||
MediaPlayerDevice,
|
||||
MediaPlayerEntity,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
STATE_UNAVAILABLE,
|
||||
@ -23,7 +23,7 @@ async def async_setup_platform(hass, config, async_add_devices, discovery_info=N
|
||||
return setup_platform(hass, config, async_add_devices, PLATFORM, BrowserModPlayer)
|
||||
|
||||
|
||||
class BrowserModPlayer(MediaPlayerDevice, BrowserModEntity):
|
||||
class BrowserModPlayer(MediaPlayerEntity, BrowserModEntity):
|
||||
domain = PLATFORM
|
||||
|
||||
def __init__(self, hass, connection, deviceID, alias=None):
|
||||
|
@ -3,7 +3,7 @@ from .const import DOMAIN, DATA_DEVICES, DATA_ALIASES, USER_COMMANDS
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
def setup_service(hass):
|
||||
async def setup_service(hass):
|
||||
|
||||
def handle_command(call):
|
||||
command = call.data.get("command", None)
|
||||
|
4
hacs.json
Normal file
4
hacs.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "browser_mod",
|
||||
"homeassistant": "0.100.0"
|
||||
}
|
@ -43,13 +43,13 @@ class BrowserPlayer extends LitElement {
|
||||
return html`
|
||||
<ha-card>
|
||||
<div class="card-content">
|
||||
<paper-icon-button
|
||||
<ha-icon-button
|
||||
.icon=${player.muted
|
||||
? "mdi:volume-off"
|
||||
: "mdi:volume-high"
|
||||
}
|
||||
@click=${this.handleMute}
|
||||
></paper-icon-button>
|
||||
></ha-icon-button>
|
||||
<ha-paper-slider
|
||||
min=0
|
||||
max=1
|
||||
|
1066
package-lock.json
generated
1066
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "browser_mod",
|
||||
"private": true,
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
@ -12,7 +12,7 @@
|
||||
"author": "Thomas Lovén",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"webpack": "^4.42.1",
|
||||
"webpack": "^4.43.0",
|
||||
"webpack-cli": "^3.3.11"
|
||||
},
|
||||
"dependencies": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user