From 1f4aca0735a16d3f769c2a650cf69ad5bc28a3da Mon Sep 17 00:00:00 2001 From: jjlawren Date: Tue, 26 Apr 2022 12:06:36 -0500 Subject: [PATCH 1/3] Describe Plex "scan_clients" button (#22478) --- source/_integrations/plex.markdown | 69 ++++++++++++++++-------------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/source/_integrations/plex.markdown b/source/_integrations/plex.markdown index 629a2e122d3..cdaea375535 100644 --- a/source/_integrations/plex.markdown +++ b/source/_integrations/plex.markdown @@ -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: - [Sensor](#sensor) +- [Button](#button) - [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. @@ -97,6 +98,43 @@ The library sensors are disabled by default, but can be enabled via the Plex int +## 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 @@ -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" | | `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 From 27b9d95ef64e5660440a488291755b27301e4833 Mon Sep 17 00:00:00 2001 From: Keilin Bickar Date: Tue, 26 Apr 2022 13:34:02 -0400 Subject: [PATCH 2/3] Remove references to removed attribute (#22527) * Remove references to removed attribute * Readded part deleted --- source/_integrations/emulated_kasa.markdown | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/_integrations/emulated_kasa.markdown b/source/_integrations/emulated_kasa.markdown index 1312f49a623..42990ff5e4c 100644 --- a/source/_integrations/emulated_kasa.markdown +++ b/source/_integrations/emulated_kasa.markdown @@ -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. 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).
@@ -66,9 +66,6 @@ A full configuration sample looks like the one below. # Example configuration.yaml entry emulated_kasa: entities: - # uses the current_power_w attribute of the switch - switch.ac: - name: "A/C" # uses the sensor state value sensor.power_meter: name: "Power Meter" From cd39b5753cec231110d028bd52d08a4d927e6b93 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 26 Apr 2022 21:47:54 +0200 Subject: [PATCH 3/3] Minor clarification of SQLAlchemy DB support (#22532) --- source/_integrations/recorder.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index e43b0947cb2..ef1eaae7920 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -28,7 +28,7 @@ The supported database solutions are: - [PostgreSQL](https://www.postgresql.org/) ≥ 12 - [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`.