I always got the error "Header fields are too long" with the HTTP error code "431 Request Header Fields Too Large" when trying to add or update a device on most browsers/clients. I could fix this error by changing CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 in sdkconfig to 1024 and cleaing the build directory before building again.
I always got the error "Header fields are too long" with the HTTP error code "431 Request Header Fields Too Large" when trying to add or update a device on most browsers/clients. I could fix this error by changing CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 in sdkconfig to 1024 and cleaing the build directory before building again.
Now my lamp works in Home Assistant.