Update information about Shelly entity naming style (#28561)

This commit is contained in:
Maciej Bieniek 2023-08-21 09:49:58 +00:00 committed by GitHub
parent cfa5d4824b
commit d1f8a9224e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,36 +69,31 @@ Shelly generation 2 devices running firmware 0.12 or later can act as a Bluetoot
## Entity naming (generation 1)
The integration uses `Device Name` to name its entities if the device has only one relay or no relays at all.
The integration uses the following strategy 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 |
- 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.
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 `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`.
- 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**.
## Binary input sensors