From 2c398b4cd818db18dc3003cd311f2d4bdb25839e Mon Sep 17 00:00:00 2001 From: Shay Levy Date: Mon, 28 Aug 2023 11:42:50 +0300 Subject: [PATCH] Revert "Update information about Shelly entity naming style (#28561)" (#28688) --- source/_integrations/shelly.markdown | 33 ++++++++++++++++------------ 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/source/_integrations/shelly.markdown b/source/_integrations/shelly.markdown index 27c42e575b9..75076820b6d 100644 --- a/source/_integrations/shelly.markdown +++ b/source/_integrations/shelly.markdown @@ -80,31 +80,36 @@ Shelly generation 2 devices running firmware 0.12 or later can act as a Bluetoot ## Entity naming (generation 1) -The integration uses the following strategy to name its entities: +The integration uses `Device Name` to name its entities if the device has only one relay or no relays at all. -- If `Device Name` and `Channel Name` are set in the device, the integration will use them to generate the entities' name, e.g. `Shelly 2.5 Kitchen Light` -- If `Device Name` or `Channel Name` are set to the default empty value, the integration will use the `Device ID` and/or default channel name to generate the entities' name, e.g. `Shelly2.5-9808D1D8B912 Channel 0`. -- If the device has only one relay or no relay at all, the integration will use `Device Name` to name its entities. +The integration uses the following strategy to name its entities if the device has more than one relay: + +- If `Device Name` or `Channel Name` is set in the device, the integration will use them to generate the entities' name. +- If channel names are set, they will be used in the entity names. The device name will not be used. +- If only the device name is set, and the device has multiple channels, the channel number will be appended to the entity name (e.g., Channel 2). +- In case device name and channel names are not set, the entity name will be generated by the `Device Type`, `Device ID` and `Channel Number`. + +Examples: + +| Device Name | Channel Name | Entity Name | +| ----------- | -------------- | ------------------------------- | +| `Not set` | `Not Set` | shellyswitch25-ABC123 Channel 1 | +| `Not set` | Kids Room Bulb | Kids Room Bulb | +| Kitchen | `Not Set` | Kitchen Channel 1 | +| Bedroom | Round Bulb | Round Bulb | Names are set from the device web page: - Device name can be set in **Settings** >> **DEVICE NAME** -- Channel name for single-channel devices can be set in **Settings** >> **CHANNEL NAME**. +- Channel name for single-channel devices can be set in **Settings** >> **CHANNEL NAME** - Channel name for multi-channel devices can be set in **Settings** >> **CHANNEL NAME** after selecting the channel, by clicking on the channel name. ## Entity naming (generation 2) The integration uses the following strategy to name its entities: -- If `Device Name` and `Output Name` are set in the device, the integration will use them to generate the entities' name, e.g. `Shelly Pro 2 Kitchen Light` -- If `Device Name` or `Output Name` are set to the default value, the integration will use the `Device ID` and/or default output name to generate the entities' name, e.g. `ShellyPro4PM-9808D1D8B912 Switch 0`. -- If the device has no relay at all, the integration will use `Device Name` to name its entities. - -Names are set from the device web page: - -- Device name can be set in **Settings** >> **Device Name**. -- Channel name can be set when you click **Output** >> **Settings** >> **Output Name**. - +- If `Channel Name` is set in the device, the integration will use it to generate the entities' name, e.g. `Kitchen Light` +- If `Channel Name` is set to the default value, the integration will use the `Device ID` and default channel name to generate the entities' name, e.g. `ShellyPro4PM-9808D1D8B912 switch_0`. ## Binary input sensors