Dallas 温度传感器
dallas_temp 组件允许您使用
DS18B20
(数据手册)
和类似的 1-Wire 温度传感器。需要在您的配置中设置 1-Wire 总线 才能使此传感器正常工作。
# Example configuration entriessensor: # only one device - platform: dallas_temp name: temperature update_interval: 120s # specific address - platform: dallas_temp address: 0x1234567812345628 name: temperature2 # second device - platform: dallas_temp index: 1 name: temperature1-
address (可选, int): 传感器的地址。如果总线上有多个设备且未指定索引,则需要此项。
-
index (可选, byte): 传感器的索引(从 0 开始)。如果总线上有多个设备且未指定地址,则需要此项。 注意此索引基于传感器的硬件地址,如果传感器被更改、添加或删除,顺序可能会改变。
-
resolution (可选, int): 从 9 到 12 的可选分辨率。越高越精确。 默认为大多数 Dallas 温度传感器的最大值:12。
-
update_interval (可选, Time): 检查传感器的时间间隔。默认为 60 秒。
-
one_wire_id (可选, One Wire): 要使用的 1-Wire 总线的 ID。如果 有多个总线,则需要此项。
-
来自 Sensor 的所有其他选项。