Commit Graph

70 Commits

Author SHA1 Message Date
Jesse Hills 76c5337987
Add support for time entities (#6399)
* Add time entities

* Add tests

* Add myself to datetime codeowners

* Fix publishing times with 0 values

* Log performing TimeCall

* Implement `on_time` trigger

* Rename var

* Fix initial value for time

* Add arg name for clarity

* Remove useless checks
2024-04-08 20:46:35 -05:00
RFDarter d6352b3be4
Datetime date initial value fix (#6483) 2024-04-08 19:36:23 +12:00
Jesse Hills 5cc3d60fee
web_server: Return early if no clients connected (#6467) 2024-04-03 17:13:59 -05:00
RFDarter 7e8e658999
web_server support for v3 (#6203) 2024-03-20 16:37:18 +13:00
Attila Farago df5dfb8087
Allow button press action in web_server to be executed via GET method (#5938) 2024-03-14 15:56:17 +13:00
RFDarter 1e96a19d09
Add datetime date entities (#6191)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-11 07:52:22 +13:00
Nate Clark 626221c5a8
Add toggle command to cover web_server endpoint (#6319) 2024-03-05 10:55:10 +13:00
Daniel Baulig 481f067625
web_server: Add a position property for cover entities that have the supports position trait (#6269) 2024-02-22 14:33:28 +13:00
Attila Farago 8e674990b0
web_server support for home assistant like styling (#5854)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-24 03:17:00 +13:00
Daniel Baulig 708ed8f38a
[web_server] Adds the ability to handle Private Network Access preflight requests (#5669) 2023-11-07 13:59:03 +13:00
Daniel Dunn e80bd8ed3d
Add text component (#5336)
Co-authored-by: Maurits <maurits@vloop.nl>
Co-authored-by: mauritskorse <mauritskorse@gmail.com>
Co-authored-by: Daniel Dunn <dannydunn@eternityforest.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-25 22:00:32 +13:00
Daniel Baulig 689dcd1e24
Add detail param to allow listing of select options in WebServer REST API (#5503) 2023-10-12 14:55:01 +13:00
Daniel Dunn 19d53c6643
Use gzip compression for the web server component's static resources (#5291)
Co-authored-by: Daniel Dunn <dannydunn@eternityforest.com>
2023-09-01 14:02:26 +12:00
dentra 7a551081ee
web server esp idf suppport (#3500)
* initial web_server_idf implementation

* initial web_server_idf implementation

* fix lint errors

* fix lint errors

* add captive_portal support

* fix lint errors

* fix lint errors

* add url decode

* Increase the max supported size of headers section in HTTP request

* add ota support

* add mulipart form data support (ota required)

* make linter happy

* make linter happy

* make linter happy

* fix review marks

* add DefaultHeaders support

* add DefaultHeaders support

* unify file names

* using std::isnan

* parse multipart requests only when ota enabled

* parse multipart requests only when ota enabled

* parse multipart requests only when ota enabled

* parse multipart requests only when ota enabled

* parse multipart requests only when ota enabled

* drop multipart request support

* drop multipart request support

* drop multipart request support

* OTA is disabled by default

* fail when OTA enabled on IDF framework

* changing file permissions to remove execute bit

* return back PGM_P and strncpy_P macro

* temp web_server fix to be compat with 2022.12

* fix config handling w/o web_server

* fix compilation with "local"

* fully remove all idf ota

* merge with esphome 2023.6

* add core/hal to web_server_base

* Update esphome/components/web_server_base/__init__.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update __init__.py

* Update __init__.py

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-11 19:08:03 -05:00
Dion Hulse 1cc7428445
Add configuration option to disable the log UI. (#4419)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-22 09:58:49 +12:00
J. Nick Koston cd57271386
Construct web_server assets at build time instead of run time (#4944)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-19 13:51:19 +12:00
Graham Brown 54474e5b33
Add Alarm Control Panel (#4770)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-15 12:34:39 +12:00
RoboMagus 568e65a6ab
Fix assumed_state switch webserver (#4259) 2023-05-01 07:28:21 +12:00
Oxan van Leeuwen 14e38f0469
Upgrade clang-format to v13 (#4535)
* Upgrade clang-format to v13

* Apply clang-format-13 formatting changes

* Format

* Format bme_680

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-20 03:38:41 +00:00
Jesse Hills 0e1d018ce3
Allow specifying target and current visual steps for climate (#4440)
* Allow specifying target and current visual steps for climate

* Fixes

* format

* format
2023-02-20 22:22:43 +00:00
Gil Peeters 11518364a1
Display the configured esphome:comment on the WebServer (#4246) 2023-01-17 13:02:54 +13:00
Jesse Hills c301ae3645
Add friendly_name to device (#4296) 2023-01-17 10:28:09 +13:00
tomaszduda23 50e8e92f0b
Fix race condition in web_server scheduler on ESP32 (#3951) 2022-12-22 20:51:24 +13:00
anatoly-savchenkov 01a4443b6c
Webui small fixes (#3713) 2022-08-15 10:28:29 +12:00
anatoly-savchenkov c7dc396b6d
Improve Web view for Climate components (#3706) 2022-08-11 13:32:55 +12:00
Samuel Sieb 9ed136dc3a
Use application/json instead of text/json (#3671) 2022-08-02 17:07:32 +12:00
Keilin Bickar f0c890f160
Remove deprecated fan speeds (#3397)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-05-19 12:50:44 +12:00
Maurice Makaay 44b68f140e
Select enhancement (#3423)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2022-05-10 16:41:16 +12:00
Jesse Hills bfbf88b2ea
Webserver utilize Component Iterator to not overload eventstream (#3310) 2022-03-23 09:45:05 +13:00
wilberforce 5b2457af0b
Add visual step/min/max for webserver climate (#3275) 2022-03-09 10:28:16 +13:00
wilberforce 3b8ca80900
Webserver v2 (#2688)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-03-08 15:02:24 +13:00
Keilin Bickar 21803607e7
Add new Lock core component (#2958)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-02-04 07:24:31 +13:00
Oxan van Leeuwen 80d03a631e
Force braces around multi-line statements (#3094)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-01-25 08:56:36 +13:00
Oxan van Leeuwen 2a84db7f85
Refactor fan platform to resemble climate/cover platforms (#2848)
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
Co-authored-by: rob-deutsch <robzyb+altgithub@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-01-23 22:21:54 +13:00
Jesse Hills 45ac577c4d
Add number setting to web_server/rest_api (#3055) 2022-01-17 12:31:44 +13:00
Jesse Hills 33f17f75a0
Upgrade ArduinoJson to 6.18.5 and migrate code (#2844) 2022-01-01 22:31:43 +13:00
wilberforce 45e346cf1b
Allow button POST on press from web server (#2913) 2021-12-14 15:08:01 +13:00
Jesse Hills b5639a6472
Add support for button entities (#2824) 2021-11-30 08:00:51 +13:00
mechanarchy 6f07421911
Optionally show internal components on the web server (#2627)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2021-11-29 16:52:20 +01:00
Laszlo Gazdag 0bdb48bcac
Make OTA function switchable in web_server component (#2685)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-11-11 08:31:22 +13:00
Oxan van Leeuwen 15f9677d33
Introduce parse_number() helper function (#2659) 2021-11-11 07:15:06 +13:00
Otto Winter 6db9d1122f
Fix compiler warnings and update platformio line filter (#2607) 2021-10-22 16:52:43 +02:00
Paul Monigatti 471b82f727
EntityBase Refactor (#2418)
* Renamed Nameable to EntityBase (cpp)

* Renamed NAMEABLE_SCHEMA to ENTITY_BASE_SCHEMA (Python)

* Renamed cg.Nameable to cg.EntityBase (Python)

* Remove redundant use of CONF_NAME from esp32_touch

* Remove redundant use of CONF_NAME from mcp3008

* Updated test

* Moved EntityBase from Component.h and Component.cpp

* Added icon property to EntityBase

* Added CONF_ICON to ENTITY_BASE_SCHEMA and added setup_entity function to cpp_helpers

* Added MQTT component getters for icon and disabled_by_default

* Lint

* Removed icon field from MQTT components

* Code generation now uses setup_entity to setENTITY_BASE_SCHEMA fields

* Removed unused import

* Added cstdint include

* Optimisation: don't set icon if it is empty

* Remove icon from NumberTraits and SelectTraits

* Removed unused import

* Integration and Total Daily Energy sensors now inherit icons from their parents during code generation

* Minor comment correction

* Removed redundant icon-handling code from sensor, switch, and text_sensor

* Update esphome/components/tsl2591/tsl2591.h

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Added icon property to binary sensor, climate, cover, and fan component tests

* Added icons for Binary Sensor, Climate, Cover, Fan, and Light  to API

* Consolidated EntityBase fields in MQTT components

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2021-10-10 10:37:05 +02:00
Andy Allsopp 946db3fd50
Add viewport meta tag to web server layout (#2419)
* Update web_server.cpp

Added viewport meta tag to web_server.cpp in order to better control layout on mobile browsers. Adds 70 characters. Vastly improves accessibility on mobile devices.

* Update web_server.cpp

split line to meet clang format requirement.

* Update web_server.cpp

Reworked line break for clangtidy
2021-09-30 13:03:30 +02:00
Otto Winter be965a60eb
Merge pull request from GHSA-48mj-p7x2-5jfm
* Move web_server auth to web_server_base

* Fix

* Fix

* Add middleware system
2021-09-28 13:53:38 +13:00
Otto Winter ac0d921413
ESP-IDF support and generic target platforms (#2303)
* Socket refactor and SSL

* esp-idf temp

* Fixes

* Echo component and noise

* Add noise API transport support

* Updates

* ESP-IDF

* Complete

* Fixes

* Fixes

* Versions update

* New i2c APIs

* Complete i2c refactor

* SPI migration

* Revert ESP Preferences migration, too complex for now

* OTA support

* Remove echo again

* Remove ssl again

* GPIOFlags updates

* Rename esphal and ICACHE_RAM_ATTR

* Make ESP32 arduino compilable again

* Fix GPIO flags

* Complete pin registry refactor and fixes

* Fixes to make test1 compile

* Remove sdkconfig file

* Ignore sdkconfig file

* Fixes in reviewing

* Make test2 compile

* Make test4 compile

* Make test5 compile

* Run clang-format

* Fix lint errors

* Use esp-idf APIs instead of btStart

* Another round of fixes

* Start implementing ESP8266

* Make test3 compile

* Guard esp8266 code

* Lint

* Reformat

* Fixes

* Fixes v2

* more fixes

* ESP-IDF tidy target

* Convert ARDUINO_ARCH_ESPxx

* Update WiFiSignalSensor

* Update time ifdefs

* OTA needs millis from hal

* RestartSwitch needs delay from hal

* ESP-IDF Uart

* Fix OTA blank password

* Allow setting sdkconfig

* Fix idf partitions and allow setting sdkconfig from yaml

* Re-add read/write compat APIs and fix esp8266 uart

* Fix esp8266 store log strings in flash

* Fix ESP32 arduino preferences not initialized

* Update ifdefs

* Change how sdkconfig change is detected

* Add checks to ci-custom and fix them

* Run clang-format

* Add esp-idf clang-tidy target and fix errors

* Fixes from clang-tidy idf round 2

* Fixes from compiling tests with esp-idf

* Run clang-format

* Switch test5.yaml to esp-idf

* Implement ESP8266 Preferences

* Lint

* Re-do PIO package version selection a bit

* Fix arduinoespressif32 package version

* Fix unit tests

* Lint

* Lint fixes

* Fix readv/writev not defined

* Fix graphing component

* Re-add all old options from core/config.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-09-20 11:47:51 +02:00
Kamil Trzciński 8a2b1d9359
Expose select on Frontend `web_server:` (#2245) 2021-09-13 10:06:28 +02:00
Oxan van Leeuwen e18dfdd656
Suppress excessive warnings about deprecated Fan interfaces (#2270) 2021-09-13 09:39:18 +02:00
Oxan van Leeuwen 1c1ad32610
Add deprecated attribute to some deprecated types/methods (#2185) 2021-08-24 06:48:12 +12:00
Jesse Hills 76991cdcc4
Add select entities and implement template select (#2067)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2021-08-02 20:00:51 +12:00