"));
stream->print(title.c_str());
stream->print(F("
States
Name | State | Actions |
"));
+ // All content is controlled and created by user - so allowing all origins is fine here.
+ stream->addHeader("Access-Control-Allow-Origin", "*");
#ifdef USE_SENSOR
for (auto *obj : App.get_sensors())
- if (!obj->is_internal())
- write_row(stream, obj, "sensor", "");
+ write_row(stream, obj, "sensor", "");
#endif
#ifdef USE_SWITCH
for (auto *obj : App.get_switches())
- if (!obj->is_internal())
- write_row(stream, obj, "switch", "");
+ write_row(stream, obj, "switch", "");
#endif
#ifdef USE_BINARY_SENSOR
for (auto *obj : App.get_binary_sensors())
- if (!obj->is_internal())
- write_row(stream, obj, "binary_sensor", "");
+ write_row(stream, obj, "binary_sensor", "");
#endif
#ifdef USE_FAN
for (auto *obj : App.get_fans())
- if (!obj->is_internal())
- write_row(stream, obj, "fan", "");
+ write_row(stream, obj, "fan", "");
#endif
#ifdef USE_LIGHT
for (auto *obj : App.get_lights())
- if (!obj->is_internal())
- write_row(stream, obj, "light", "");
+ write_row(stream, obj, "light", "");
#endif
#ifdef USE_TEXT_SENSOR
for (auto *obj : App.get_text_sensors())
- if (!obj->is_internal())
- write_row(stream, obj, "text_sensor", "");
+ write_row(stream, obj, "text_sensor", "");
#endif
stream->print(F("
See ESPHome Web API for "