Skip to content

Commit b4acdf2

Browse files
authored
[dallas_temp] Add index parameter (#5500)
1 parent 486f4fc commit b4acdf2

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

content/components/sensor/dallas_temp.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,27 @@ and similar 1-Wire temperature sensors. A {{< docref "/components/one_wire/index
1414
required to be set up in your configuration for this sensor to work.
1515

1616
```yaml
17-
# Example configuration entry
17+
# Example configuration entries
1818
sensor:
19+
# only one device
1920
- platform: dallas_temp
20-
address: 0x1234567812345628
2121
name: temperature
2222
update_interval: 120s
23+
# specific address
24+
- platform: dallas_temp
25+
address: 0x1234567812345628
26+
name: temperature2
27+
# second device
28+
- platform: dallas_temp
29+
index: 1
30+
name: temperature1
2331
```
2432
2533
## Configuration variables
2634
27-
- **address** (*Optional*, int): The address of the sensor. Required if there is more than one device on the bus.
35+
- **address** (*Optional*, int): The address of the sensor. Required if there is more than one device on the bus and index is not specified.
36+
- **index** (*Optional*, byte): The index (0-based) of the sensor. Required if there is more than one device on the bus and address is not specified.
37+
*Note this index is based on the hardware addresses of the sensors and the order can change if sensors are changed, added, or removed.*
2838
- **resolution** (*Optional*, int): An optional resolution from 9 to 12. Higher means more accurate.
2939
Defaults to the maximum for most Dallas temperature sensors: 12.
3040

0 commit comments

Comments
 (0)