Update service names on HowTo

Supports #168
This commit is contained in:
Edward Firmo
2024-03-01 13:50:45 +01:00
parent e830501e97
commit 71c2d712dd

View File

@@ -144,16 +144,18 @@ To show a notification on the NSPAnel, the following service call can be used:
service: esphome.panelname_notification_show
data:
label: Example text
text: Example text
message: Example text
```
> [!NOTE]
> For more details about this service call, please refer to our [API documentation](api.md#notification-show-service-notification_show).
To clear any notifications, the following service call can be used:
```yaml
service: esphome.panelname_notification_clear
data: {}
```
> [!NOTE]
> For more details about this service call, please refer to our [API documentation](api.md#notification-clear-service-notification_clear).
To use the notifications in an automation, again simply use the service call as shown in the example below:
@@ -170,11 +172,12 @@ trigger:
- service: esphome.panelname_notification_show
data:
label: Motion Detected
text: Example for a Notification on the Panel Screen
message: Example for a Notification on the Panel Screen
```
## Climate control with Relays
> Attention!! Although these instructions are still valid, since v4.0 there is a better way to setup a climate control using the panel's relays an the [add-on climate](addon_climate.md).
> [!ATTENTION]
> Although these instructions are still valid, since v4.0 there is a better way to setup a climate control using the panel's relays an the [add-on climate](addon_climate.md).
In order to use the NSPanel to control a radiator or underfloor heating, at least one Generic Thermostat must be created in the HA.
More information can be found here: https://www.home-assistant.io/integrations/generic_thermostat/
@@ -211,11 +214,11 @@ The following services enable this functionality:
### Basic Pages
To open a specific page, you can utilize the `esphome.xxxxxx_send_command_printf` service.
To open a specific page, you can utilize the `esphome.xxxxxx_command` service.
Here's an example that demonstrates how to open the `home` page:
```yaml
service: esphome.xxxxx_send_command_printf
service: esphome.xxxxx_command
data:
cmd: page home
```
@@ -233,58 +236,31 @@ Currently, the following pages can be accessed using this method:
- `home`
- `qrcode`
- `screensaver`
- `utilities`
For instance, to directly navigate to button page 2, replace `home` in the command with `buttonpage02`:
```yaml
service: esphome.xxxxx_send_command_printf
service: esphome.xxxxx_command
data:
cmd: page buttonpage02
```
> [!NOTE]
> For more details about this service call, please refer to our [API documentation](api.md#command-service-command).
### Entity-Specific Pages
For entity-specific pages, a more detailed call is required as it involves specifying the entity.
You can use the service `esphome.xxxxx_open_entity_settings_page` as shown in the following example:
You can use the service `esphome.xxxxx_entity_details_show` as shown in the following example:
```yaml
service: esphome.xxxxx_open_entity_settings_page
service: esphome.xxxxx_entity_details_show
data:
page: climate
page_label: My thermostat
page_icon: \uE237
page_icon_color:
- 255
- 0
- 0
entity: climate.my_thermostat
back_page: home
```
The required parameters for this service are as follows:
- **page**: The page to be opened, typically the same as the domain of the entity (e.g., `climate`, `cover`, `light`).
- **page_label**: The title of the page, usually the friendly name of the entity.
- **page_icon**: The UTF-8 code for the icon to be displayed at the top left of the page.
Supported icons are listed on the [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html) page.
The code is a 4-character hex string found near the icon in the list. Prefix the icon code with `\u` to indicate it's a UTF-8 hex code.
- **page_icon_color**: An RGB array with values from 0 to 255 for red, green, and blue.
ESPHome automatically converts this array to a [16-bit RGB (RGB565)](https://en.wikipedia.org/wiki/List_of_monochrome_and_RGB_color_formats#16-bit_RGB_(also_known_as_RGB565)) format,
which may lead to some color distortion.
- **entity**: The `entity_id` from Home Assistant for the relevant entity.
- **back_page**: The page to return to when the detailed page is manually closed or after a page timeout.
Only [Basic pages](#basic-pages) are supported.
### Notification Page
To display the notification page, use the `esphome.xxxxx_notification_show` service as shown below:
```yaml
service: esphome.xxxxx_notification_show
data:
label: "Notification title"
message: "Attention! This is a placeholder for your notification message."
entity_id: climate.my_thermostat
back_page: buttonpage01
```
> [!NOTE]
> For more details about this service call, please refer to our [API documentation](api.md#entity-details-show-service-entity_details_show).
### Wake-up Page
@@ -309,6 +285,9 @@ If the panel is already active, the current page remains displayed.
This feature is particularly useful in conjunction with a motion sensor to wake up your panel automatically.
By repeatedly calling this service whenever motion is detected, the panel can be either woken up or have its sleep timeout timer reset (if `reset_timer` is set to `true`).
> [!NOTE]
> For more details about this service call, please refer to our [API documentation](api.md#wake-up-service-wake_up).
## Play RTTTL Sound
HA can send a RTTTL to the NSPanel, custom melodies are possible.
@@ -329,6 +308,9 @@ More information: https://esphome.io/components/rtttl.html#common-beeps
More songs: https://codebender.cc/sketch:109888#RTTTL%20Songs.ino
> [!NOTE]
> For more details about this service call, please refer to our [API documentation](api.md#rtttl-play-service-rtttl_play).
## Start Automations via Input_Boolean
Although the NSPanel can execute scripts directly over the buttons, there is also the possibility of starting automations directly by the means of Input_Boolean.