Merge branch 'current' into next

This commit is contained in:
Franck Nijhof 2020-01-27 15:47:25 +01:00
commit adf27386d9
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
15 changed files with 129 additions and 89 deletions

View File

@ -12,7 +12,7 @@ end
group :jekyll_plugins do
gem 'jekyll-paginate', '1.1.0'
gem 'jekyll-redirect-from', '0.15.0'
gem 'jekyll-redirect-from', '0.16.0'
gem 'jekyll-sitemap', '1.4.0'
gem 'jekyll-time-to-read', '0.1.2'
gem 'jekyll-commonmark', '1.3.1'

View File

@ -25,11 +25,11 @@ GEM
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
ffi (1.11.2)
ffi (1.11.2-x64-mingw32)
ffi (1.12.1)
ffi (1.12.1-x64-mingw32)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.7.0)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
jekyll (4.0.0)
addressable (~> 2.4)
@ -50,7 +50,7 @@ GEM
commonmarker (~> 0.14)
jekyll (>= 3.7, < 5.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.15.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (2.0.1)
sassc (> 2.0.1, < 3.0)
@ -64,7 +64,7 @@ GEM
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.0)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
@ -78,15 +78,15 @@ GEM
mini_portile2 (~> 2.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.1)
public_suffix (4.0.3)
rack (2.0.8)
rack-protection (2.0.8.1)
rack
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.13.0)
rouge (3.15.0)
ruby-enum (0.7.2)
i18n
ruby2_keywords (0.0.1)
@ -111,7 +111,7 @@ GEM
concurrent-ruby (~> 1.0)
tzinfo-data (1.2019.3)
tzinfo (>= 1.0.0)
unicode-display_width (1.6.0)
unicode-display_width (1.6.1)
PLATFORMS
ruby
@ -122,7 +122,7 @@ DEPENDENCIES
jekyll (= 4.0.0)
jekyll-commonmark (= 1.3.1)
jekyll-paginate (= 1.1.0)
jekyll-redirect-from (= 0.15.0)
jekyll-redirect-from (= 0.16.0)
jekyll-sitemap (= 1.4.0)
jekyll-time-to-read (= 0.1.2)
nokogiri (= 1.10.7)

View File

@ -22,12 +22,6 @@ automation:
mood: happy
```
<div class='note warning'>
Starting 0.42, it is no longer possible to listen for event `homeassistant_start`. Use the 'homeassistant' platform below instead.
</div>
### Home Assistant trigger
Triggers when Home Assistant starts up or shuts down.

View File

@ -4,7 +4,7 @@ description: "Details about the database used by Home Assistant."
redirect_from: /details/database/
---
The default database used by Home Assistant is [SQLite](https://www.sqlite.org/), and the database file is stored in your [configuration directory](/getting-started/configuration/) (e.g., `<path to config dir>/.homeassistant/home-assistant_v2.db`). If you prefer to run a database server (e.g. PostgreSQL), use the [`recorder` component](/integrations/recorder/).
Database is used in by Home Assistant as history and tracker only, to store the events and its parameters. The default database used by Home Assistant is [SQLite](https://www.sqlite.org/), and the database file is stored in your [configuration directory](/getting-started/configuration/) (e.g., `<path to config dir>/.homeassistant/home-assistant_v2.db`). If you prefer to run a database server (e.g. PostgreSQL), use the [`recorder` component](/integrations/recorder/).
To work with the SQLite database manually from the command-line, you will need an [installation](http://www.sqlitetutorial.net/download-install-sqlite/) of `sqlite3`. Alternatively [DB Browser for SQLite](http://sqlitebrowser.org/) provides a viewer for exploring the database data and an editor for executing SQL commands.
First load your database with `sqlite3`:

View File

@ -81,7 +81,7 @@ Device class is currently supported by the following components:
* [Binary Sensor](/integrations/binary_sensor/)
* [Sensor](/integrations/sensor/)
* [Cover](/integrations/cover/)
* [Media Player](integrations/media_player/)
* [Media Player](/integrations/media_player/)
### Manual customization

View File

@ -8,62 +8,49 @@ The core of Home Assistant is the event bus. The event bus allows any integratio
Home Assistant contains a few built-in events that are used to coordinate between various components.
### Event `homeassistant_start`
Event `homeassistant_start` is fired when all integrations from the configuration have been initialized. This is the event that will start the timer firing off `time_changed` events.
<div class='note warning'>
Starting 0.42, it is no longer possible to listen for event `homeassistant_start`. Use the 'homeassistant' [platform](/docs/automation/trigger) instead.
</div>
### Event `homeassistant_stop`
Event `homeassistant_stop` is fired when Home Assistant is shutting down. It should be used to close any open connection or release any resources.
### Event `state_changed`
Event `state_changed` is fired when a state changes. Both `old_state` and `new_state` are state objects. [Documentation about state objects.](/topics/state_object/)
Field | Description
----- | -----------
`entity_id` | Entity ID of the changed entity. Example: `light.kitchen`
`old_state` | The previous state of the entity before it changed. This field is omitted if the entity is new.
`new_state` | The new state of the entity. This field is omitted if the entity is removed from the state machine.
| Field | Description |
| ----------- | --------------------------------------------------------------------------------------------------- |
| `entity_id` | Entity ID of the changed entity. Example: `light.kitchen` |
| `old_state` | The previous state of the entity before it changed. This field is omitted if the entity is new. |
| `new_state` | The new state of the entity. This field is omitted if the entity is removed from the state machine. |
### Event `time_changed`
Event `time_changed` is fired every second by the timer and contains the current time.
Field | Description
----- | -----------
`now` | A [datetime object](https://docs.python.org/3.4/library/datetime.html#datetime.datetime) containing the current time in UTC.
| Field | Description |
| ----- | ---------------------------------------------------------------------------------------------------------------------------- |
| `now` | A [datetime object](https://docs.python.org/3.4/library/datetime.html#datetime.datetime) containing the current time in UTC. |
### Event `service_registered`
Event `service_registered` is fired when a new service has been registered within Home Assistant.
Field | Description
----- | -----------
`domain` | Domain of the service. Example: `light`.
`service` | The service to call. Example: `turn_on`
| Field | Description |
| --------- | ---------------------------------------- |
| `domain` | Domain of the service. Example: `light`. |
| `service` | The service to call. Example: `turn_on` |
### Event `call_service`
Event `call_service` is fired to call a service.
Field | Description
----- | -----------
`domain` | Domain of the service. Example: `light`.
`service` | The service to call. Example: `turn_on`
`service_data` | Dictionary with the service call parameters. Example: `{ 'brightness': 120 }`.
`service_call_id` | String with a unique call id. Example: `23123-4`.
| Field | Description |
| ----------------- | ------------------------------------------------------------------------------ |
| `domain` | Domain of the service. Example: `light`. |
| `service` | The service to call. Example: `turn_on` |
| `service_data` | Dictionary with the service call parameters. Example: `{ 'brightness': 120 }`. |
| `service_call_id` | String with a unique call id. Example: `23123-4`. |
### Event `service_executed`
Event `service_executed` is fired by the service handler to indicate the service is done.
Field | Description
----- | -----------
`service_call_id` | String with the unique call id of the service call that was executed. Example: `23123-4`.
| Field | Description |
| ----------------- | ----------------------------------------------------------------------------------------- |
| `service_call_id` | String with the unique call id of the service call that was executed. Example: `23123-4`. |
<div class='note warning'>
@ -75,15 +62,15 @@ Field | Description
Event `platform_discovered` is fired when a new platform has been discovered by the [`discovery`](/integrations/discovery/) component.
Field | Description
----- | -----------
`service` | The platform that is discovered. Example: `zwave`.
`discovered` | Dictionary containing discovery information. Example: `{ "host": "192.168.1.10", "port": 8889}`.
| Field | Description |
| ------------ | ------------------------------------------------------------------------------------------------ |
| `service` | The platform that is discovered. Example: `zwave`. |
| `discovered` | Dictionary containing discovery information. Example: `{ "host": "192.168.1.10", "port": 8889}`. |
### Event `component_loaded`
Event `component_loaded` is fired when a new integration has been loaded and initialized.
Field | Description
----- | -----------
`component` | Domain of the integration that has just been initialized. Example: `light`.
| Field | Description |
| ----------- | --------------------------------------------------------------------------- |
| `component` | Domain of the integration that has just been initialized. Example: `light`. |

View File

@ -69,5 +69,6 @@ The use of `devices` or `exclude` is recommended when using `accesspoints` to av
List of models that are known to use port 80:
- Nighthawk X4S - AC2600 (R7800)
- Orbi
- XR500
See the [device tracker integration page](/integrations/device_tracker/) for instructions how to configure the people to be tracked.

View File

@ -56,7 +56,7 @@ if entity_id is not None:
service_data = {"entity_id": entity_id, "rgb_color": rgb_color, "brightness": 255}
hass.services.call("light", "turn_on", service_data, False)
```
The above `python_script` can be called using the following JSON as an input.
The above `python_script` can be called using the following YAML as an input.
```yaml
entity_id: light.bedroom

View File

@ -54,6 +54,10 @@ recorder:
description: The list of entity ids to be excluded from recordings.
required: false
type: list
event_types:
description: The list of event types to be excluded from recordings.
required: false
type: list
include:
description: Configure which integrations should be included in recordings. If set, all other entities will not be recorded.
required: false
@ -85,6 +89,8 @@ recorder:
- sun.sun # Don't record sun data
- sensor.last_boot # Comes from 'systemmonitor' sensor platform
- sensor.date
event_types:
- call_service # Don't record service calls
```
define domains and entities to record by using the `include` configuration (aka. whitelist) is convenient if you have a lot of entities in your system and your `exclude` lists possibly get very large, so it might be better just to define the entities or domains to record.

View File

@ -79,6 +79,25 @@ remote:
- pronto:pronto_hex:[optional_repeat]
```
## Add command as entity button in Lovelace UI
```yaml
type: entity-button
tap_action:
action: call-service
service: remote.send_command
service_data:
command: activate_towel_heater
entity_id: remote.xiaomi_miio_ir
hold_action:
action: more-info
show_icon: true
show_name: true
entity: remote.xiaomi_miio_ir
icon: 'mdi:radiator'
name: Activate Towel Heater
```
## Use named commands to create UI buttons
```yaml

View File

@ -30,6 +30,8 @@ The following devices are known to work with this component.
### Plugs
Plugs are type `switch` when autodiscovery has been disabled.
- HS100
- HS103
- HS105

View File

@ -216,6 +216,20 @@ The following table shows the units of measurement for each attribute:
## Retrieving the Access Token
### Xiaomi Home app (Xiaomi Aqara Gateway, android?)
1. Install the Xiaomi Home app.
2. Sign In/make an account.
3. Make sure you set your region to: Mainland China (Seems to be the longest line with Chines characters) under settings -> Region (language can later be set on English).
4. Select your Gateway in Xiaomi Home app.
5. Then the 3 dots at the top right of the screen.
6. Then click on about.
7. Tap the version number (Plug-in version 2.77.1 as of January 2020) at the bottom of the screen repeatedly.
8. You should now see 2 extra options listed in English, this means you enabled developer mode. [if not, try all steps again!].
9. Under "Hub info" there is quite some text in JSON format, this includes the "token" that you need.
### Alternative methods
<div class='note'>
If using an Android device to retrieve the Access Token only `v5.4.49` of Mi Home is confirmed working (December 2019). Use `v5.4.49` of Mi Home locate a text file under the `Smarthome/logs` folder where the 32 character token is stored. There will likely be several text files in this directory, search all of them for the word 'token' and you should find it there. Be advised that the latest version of Mi Home does not store the token in clear text.

View File

@ -18,14 +18,13 @@ There is currently support for the following device types within Home Assistant:
- [Media Player](#media-player)
- [Notifications](#notifications)
To begin with enable *LG Connect Apps* feature in *Network* settings of the TV [instructions](https://www.lg.com/uk/support/product-help/CT00008334-1437131798537-others).
Once basic configuration is added to your `configuration.yaml` file. A notification should be visible in the frontend's **Notification** section. Follow the instructions and accept the pairing request on your TV.
Pairing information will be saved to a configuration file `webostv.conf` in the Home Assistant configuration directory. This process is IP address-sensitive, in case the IP address of your TV would change in future.
### Configuration
## Configuration
To add a TV to your installation, add the following to your `configuration.yaml` file:
@ -58,7 +57,7 @@ customize:
type: list
{% endconfiguration %}
### Example
### Full configuration example
A full configuration example will look like the sample below:
@ -77,7 +76,7 @@ webostv:
- youtube
- makotv
- netflix
media_player:
notify:
@ -85,7 +84,23 @@ notify:
Avoid using `[ ]` in the `name:` of your device.
### Turn on action
### Using multiple TVs
It is also possible to use multiple TVs with this integration.
```yaml
# Example configuration.yaml entry with multiple TVs
webostv:
- name: Living Room TV
host: 192.168.1.100
- name: Bedroom TV
host: 192.168.1.101
```
Please note, the above provides a minimal example, however, all options are
available for each individual TV.
## Turn on action
Home Assistant is able to turn on a LG webOS Smart TV if you specify an action, like HDMI-CEC or WakeOnLan.
@ -112,11 +127,11 @@ notify:
Any other [actions](/docs/automation/action/) to power on the device can be configured.
### Sources
## Sources
To obtain complete list of available sources currently configured on the TV, once the webOS TV is configured and linked, while its powered on head to the **Developer Tools** > **States**, find your `media_player.<name>` and use the sources listed in `source_list:` remembering to split them per line into your `sources:` configuration.
### Change channel through play_media service
## Change channel through play_media service
The `play_media` service can be used in a script to switch to the specified tv channel. It selects the best matching channel according to the `media_content_id` parameter:
@ -140,12 +155,12 @@ data:
media_content_type: "channel"
```
### Next/Previous buttons
## Next/Previous buttons
The behaviour of the next and previous buttons is different depending on the active source:
- if the source is 'LiveTV' (television): next/previous buttons act as channel up/down
- otherwise: next/previous buttons act as next/previous track
- if the source is 'LiveTV' (television): next/previous buttons act as channel up/down
- otherwise: next/previous buttons act as next/previous track
### Sound output
@ -154,30 +169,30 @@ To change the sound output, the following service is available:
#### Service `webostv.select_sound_output`
| Service data attribute | Optional | Description |
|------------------------|----------|---------------------------------------------------------|
| `entity_id` | no | Target a specific webostv media player. |
| `sound_output` | no | Name of the sound output to switch to. |
| Service data attribute | Optional | Description |
| ---------------------- | -------- | --------------------------------------- |
| `entity_id` | no | Target a specific webostv media player. |
| `sound_output` | no | Name of the sound output to switch to. |
### Generic commands and buttons
Available services: `button`, `command`
#### Service `webostv.button`
### Service `webostv.button`
| Service data attribute | Optional | Description |
|------------------------|----------|---------------------------------------------------------|
| `entity_id` | no | Target a specific webostv media player. |
| `button` | no | Name of the button. Known possible values are `LEFT`, `RIGHT`, `DOWN`, `UP`, `HOME`, `BACK`, `ENTER`, `DASH`, `INFO`, `ASTERISK`, `CC`, `EXIT`, `MUTE`, `RED`, `GREEN`, `BLUE`, `VOLUMEUP`, `VOLUMEDOWN`, `CHANNELUP`, `CHANNELDOWN`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
#### Service `webostv.command`
| Service data attribute | Optional | Description |
| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `entity_id` | no | Target a specific webostv media player. |
| `button` | no | Name of the button. Known possible values are `LEFT`, `RIGHT`, `DOWN`, `UP`, `HOME`, `BACK`, `ENTER`, `DASH`, `INFO`, `ASTERISK`, `CC`, `EXIT`, `MUTE`, `RED`, `GREEN`, `BLUE`, `VOLUMEUP`, `VOLUMEDOWN`, `CHANNELUP`, `CHANNELDOWN`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
| Service data attribute | Optional | Description |
|------------------------|----------|---------------------------------------------------------|
| `entity_id` | no | Target a specific webostv media player. |
| `command` | no | Endpoint for the command, e.g. `media.controls/rewind`. The full list of known endpoints is available at https://github.com/bendavid/aiopylgtv/blob/master/aiopylgtv/endpoints.py |
#### Example
### Service `webostv.command`
| Service data attribute | Optional | Description |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `entity_id` | no | Target a specific webostv media player. |
| `command` | no | Endpoint for the command, e.g. `media.controls/rewind`. The full list of known endpoints is available at <https://github.com/bendavid/aiopylgtv/blob/master/aiopylgtv/endpoints.py> |
### Example
```yaml
script:

View File

@ -68,6 +68,8 @@ xiaomi_aqara:
- key: xxxxxxxxxxxxxxxx
```
For one gateway to avoid errors, don't provide the MAC address.
### Multiple Gateways
```yaml

View File

@ -62,7 +62,7 @@ We will need a few things to get started with installing Home Assistant. The Ras
5. Insert the SD card into your Raspberry Pi. If you are going to use an Ethernet cable, connect that too.
6. Connect your power supply to the Raspberry Pi.
7. The Raspberry Pi will now boot up, connect to the Internet and download the latest version of Home Assistant. This will take about 20 minutes.
8. Home Assistant will be available at `http://hassio.local:8123`. If you are running an older Windows version or have a stricter network configuration, you might need to access Home Assistant at `http://hassio:8123`.
8. Home Assistant will be available at `http://hassio.local:8123`. If you are running an older Windows version or have a stricter network configuration, you might need to access Home Assistant at `http://hassio:8123` or `http://X.X.X.X:8123` (replace `X.X.X.X` with your Pi's IP address).
9. If you used a USB stick for configuring the network, you can now remove it.
[the examples]: https://github.com/home-assistant/hassos/blob/dev/Documentation/network.md