ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
homeassistant.cpp
Go to the documentation of this file.
1#include "homeassistant.h"
2
4
6
7PROGMEM_STRING_TABLE(UnsetValues, "None", "unavailable", "unknown");
8
9bool is_unset(StringRef value) { return progmem_string_table_find<UnsetValues>(value.c_str(), value.size()) >= 0; }
10
11} // namespace esphome::homeassistant
StringRef is a reference to a string owned by something else.
Definition string_ref.h:31
bool is_unset(StringRef value)
True for what Home Assistant reports when there is no value: "None" for an attribute that is not set,...
PROGMEM_STRING_TABLE(UnsetValues, "None", "unavailable", "unknown")
int16_t progmem_string_table_find(const char *value, size_t len)
The index of the string value (len bytes, in RAM) in a PROGMEM_STRING_TABLE, or -1 when it is not one...
Definition progmem.h:160