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" 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 diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index 49bf463e85b..ba6ea0beef4 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`.