mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Merge branch 'current' into next
This commit is contained in:
commit
9941ebc8bb
@ -17,7 +17,7 @@ The Emulated Kasa integration emulates a TP-Link Kasa smart plug and announces t
|
|||||||
For example, the [Sense Energy Monitor](/integrations/sense) can use this to identify power usage.
|
For example, the [Sense Energy Monitor](/integrations/sense) can use this to identify power usage.
|
||||||
|
|
||||||
The configuration includes a list of entities to expose with attributes for the published name and current power usage.
|
The configuration includes a list of entities to expose with attributes for the published name and current power usage.
|
||||||
If the entity is a sensor or has a `current_power_w` attribute (such as in a smart switch), that value will be reported as the current power usage unless the power field is defined.
|
If the entity is a sensor, that value will be reported as the current power usage unless the power field is defined.
|
||||||
The power field can contain a hardcoded value, a sensor, or a template (see configuration example).
|
The power field can contain a hardcoded value, a sensor, or a template (see configuration example).
|
||||||
|
|
||||||
<div class='note'>
|
<div class='note'>
|
||||||
@ -66,9 +66,6 @@ A full configuration sample looks like the one below.
|
|||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
emulated_kasa:
|
emulated_kasa:
|
||||||
entities:
|
entities:
|
||||||
# uses the current_power_w attribute of the switch
|
|
||||||
switch.ac:
|
|
||||||
name: "A/C"
|
|
||||||
# uses the sensor state value
|
# uses the sensor state value
|
||||||
sensor.power_meter:
|
sensor.power_meter:
|
||||||
name: "Power Meter"
|
name: "Power Meter"
|
||||||
|
@ -26,6 +26,7 @@ Support for playing music directly on linked [Sonos](/integrations/sonos/) speak
|
|||||||
There is currently support for the following device types within Home Assistant:
|
There is currently support for the following device types within Home Assistant:
|
||||||
|
|
||||||
- [Sensor](#sensor)
|
- [Sensor](#sensor)
|
||||||
|
- [Button](#button)
|
||||||
- [Media Player](#media-player)
|
- [Media Player](#media-player)
|
||||||
|
|
||||||
If a Plex server has been claimed by a Plex account via the [claim interface](https://plex.tv/claim), Home Assistant will require authentication to connect.
|
If a Plex server has been claimed by a Plex account via the [claim interface](https://plex.tv/claim), Home Assistant will require authentication to connect.
|
||||||
@ -97,6 +98,43 @@ The library sensors are disabled by default, but can be enabled via the Plex int
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
## Button
|
||||||
|
|
||||||
|
A `button.scan_clients` entity is available to discover new controllable Plex clients. This may be necessary in scripts or automations which control a Plex client app, but where the underlying device must be turned on first. This button is preferred over the legacy `plex.scan_for_clients` service.
|
||||||
|
|
||||||
|
Example script:
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
play_plex_on_tv:
|
||||||
|
sequence:
|
||||||
|
- service: media_player.select_source
|
||||||
|
target:
|
||||||
|
entity_id: media_player.smart_tv
|
||||||
|
data:
|
||||||
|
source: "Plex"
|
||||||
|
- wait_for_trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: media_player.smart_tv
|
||||||
|
to: "on"
|
||||||
|
timeout:
|
||||||
|
seconds: 10
|
||||||
|
- service: button.press
|
||||||
|
target:
|
||||||
|
entity_id: button.scan_clients_plex
|
||||||
|
- wait_template: "{{ not is_state('media_player.plex_smart_tv', 'unavailable') }}"
|
||||||
|
timeout: "00:00:10"
|
||||||
|
continue_on_timeout: false
|
||||||
|
- service: media_player.play_media
|
||||||
|
target:
|
||||||
|
entity_id: media_player.plex_smart_tv
|
||||||
|
data:
|
||||||
|
media_content_id: "{"library_name": "Movies", "title": "Zoolander"}"
|
||||||
|
media_content_type: movie
|
||||||
|
```
|
||||||
|
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
## Media Player
|
## Media Player
|
||||||
|
|
||||||
@ -335,37 +373,6 @@ Refresh a Plex library to scan for new and updated media.
|
|||||||
| `server_name` | No | Name of Plex server to use if multiple servers configured. | "My Plex Server" |
|
| `server_name` | No | Name of Plex server to use if multiple servers configured. | "My Plex Server" |
|
||||||
| `library_name` | Yes | Name of Plex library to update. | "TV Shows" |
|
| `library_name` | Yes | Name of Plex library to update. | "TV Shows" |
|
||||||
|
|
||||||
### Service `plex.scan_for_clients`
|
|
||||||
|
|
||||||
Scan for new controllable Plex clients. This may be necessary in scripts or automations which control a Plex `media_player` entity, but where the underlying device must be turned on first.
|
|
||||||
|
|
||||||
Example script:
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
play_plex_on_tv:
|
|
||||||
sequence:
|
|
||||||
- service: media_player.select_source
|
|
||||||
target:
|
|
||||||
entity_id: media_player.smart_tv
|
|
||||||
data:
|
|
||||||
source: "Plex"
|
|
||||||
- wait_template: "{{ is_state('media_player.smart_tv', 'On') }}"
|
|
||||||
timeout: "00:00:10"
|
|
||||||
- service: plex.scan_for_clients
|
|
||||||
- wait_template: "{{ not is_state('media_player.plex_smart_tv', 'unavailable') }}"
|
|
||||||
timeout: "00:00:10"
|
|
||||||
continue_on_timeout: false
|
|
||||||
- service: media_player.play_media
|
|
||||||
target:
|
|
||||||
entity_id: media_player.plex_smart_tv
|
|
||||||
data:
|
|
||||||
media_content_id: "{"library_name": "Movies", "title": "Zoolander"}"
|
|
||||||
media_content_type: movie
|
|
||||||
```
|
|
||||||
|
|
||||||
{% endraw %}
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ The supported database solutions are:
|
|||||||
- [PostgreSQL](https://www.postgresql.org/) ≥ 12
|
- [PostgreSQL](https://www.postgresql.org/) ≥ 12
|
||||||
- [SQLite](https://www.sqlite.org/) ≥ 3.31.0
|
- [SQLite](https://www.sqlite.org/) ≥ 3.31.0
|
||||||
|
|
||||||
Although SQLAlchemy supports additional database solutions, it will behave differently on different databases, and features relied on by the recorder may work differently, or not at all, in different databases.
|
Although SQLAlchemy supports database solutions in addition to the ones supported by Home Assistant, it will behave differently on different databases, and features relied on by the recorder may work differently, or not at all, in different databases.
|
||||||
|
|
||||||
The default, and recommended, database engine is [SQLite](https://www.sqlite.org/) which does not require any configuration. The database is stored in your Home Assistant configuration directory ('/config/') and is named `home-assistant_v2.db`.
|
The default, and recommended, database engine is [SQLite](https://www.sqlite.org/) which does not require any configuration. The database is stored in your Home Assistant configuration directory ('/config/') and is named `home-assistant_v2.db`.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user