20 if (this->
index_ >= devices.size()) {
21 ESP_LOGE(TAG,
"Index %d out of range, only %d devices found", this->
index_, devices.size());
28 if (devices.empty()) {
29 ESP_LOGE(TAG,
"No devices, can't auto-select address");
32 if (devices.size() > 1) {
33 ESP_LOGE(TAG,
"More than one device, can't auto-select address");
const std::vector< uint64_t > & get_devices()
Return the list of found devices.
bool select(uint64_t address)
Select a specific address on the bus for the following command.
virtual void write8(uint8_t val)=0
Write a word to the bus. LSB first.
static constexpr uint8_t INDEX_NOT_SET
OneWireBus * bus_
pointer to OneWireBus instance
bool send_command_(uint8_t cmd)
send command on the bus
bool check_address_or_index_()
find an address if necessary should be called from setup
ESPHOME_LOG_TAG(TAG, "one_wire")