* teleinfo: avoid a buffer overflow.
When reading tag or values, data is written to the buffer even if the
size if bigger than the buffer. Add a new 'max_len' argument to
get_field() to avoid this error.
Signed-off-by: 0hax <0hax@protonmail.com>
* teleinfo: read extra timestamp field for some tags.
Some tags has an extra timestamp field that need to be read before the
actual data.
The code is inspired by Jpsy work:
29339c14f9
Signed-off-by: 0hax <0hax@protonmail.com>
* teleinfo: increase MAX_BUF_SIZE to suffice for 3-phase Linky in Standard mode.
* teleinfo: handle DATE tag correctly.
The DATE tag is special due its format and need to be handled
separately.
Fix from DrCoolzic.
Signed-off-by: 0hax <0hax@protonmail.com>
Co-authored-by: Jörg Wagner <jwagner@digilog.de>
* Adding first version of current_base cover. No Interlock yet.
* simplifying code
* Implementing malfunction protection
* Adding test
* Fixing too long lines
* Fixing test sensor names
* Adding missing id's in ade7953 tests
* Adding code owners as requested
* Fixing issue setting position when stop reached
* Fixing issue setting position when stop reached
* Black formatting
* Fixing format issues
* Fix for concurrent changes
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
On bootup the ccs811 reports that no data is available. No error flag
is set in that case. The current implementation ignores this, reads
and publishes the invalid data, which is 0xFDFD for both tvoc and co2
in my case.
This commit fixes this and does not read and publish invalid data.
* Add serveral options for SSD1306 integration
* Add SSD1305 support
(SSD1305 is similar to SSD1306, it seems SSD1305 has
brightness and color register but does not have charge pump)
* Add some description when manipulating registers
* Add flip, offset and invert option to get more compatibility
with various display modules
* Fix typo `setup_ssd1036' -> `setup_ssd1306'
* Add SSD1306 brightness validation tip
* Add more description, limit offset range
* Changes according to linter
* Fix test
* Raise error instead of using warning
* Fix wrong logic
* Remove logger
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Remove logging import
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* adding a scan results wifi text sensor
* Code comment
* Adding scan results to test
* Removing redundant call
* linting
* Better method to update wifi info
Co-authored-by: Otto Winter <otto@otto-winter.com>
* Getting loop back
At least for now.
* Trying out suggestion again
* Applying cr suggestions
Co-authored-by: Otto Winter <otto@otto-winter.com>
* numeric speed added
* when dumping config for MQTT components log a note when skipped due to is_internal
* added new topics to paython code validation/generation
* reformatted with black
* formatting corrected
* use dump_config_ mechanism to skip internal components
* use dump_config_ mechanism to skip internal components
* style issues resolved
* do_dump_config removed
* formatting fixed
* formatting fixed
* Drop parent dump_config() calls
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
This allows datapoint update messages to be handled even if the overall
message is longer than required (likely that it contains trailing empty
bytes).
The specific type handling will read only the expected data lengths so
we only need to hard bail if we have too little data not too much.
* Add support for ltr390
* Fix linting errors
* Fix more linting errors
* Linting fixes continued
* Linting forever
* Another one
* Fix regression and linting
* Fix narrowing conversion
* Add test and bugfix
* Add codeowners
* Update CODEOWNERS
* Update sensor defs
* Reformatted with black
* Fixed device class import
* Update CODEOWNERS
* Update CODEOWNERS
* Adding all config options
As requested https://github.com/esphome/esphome/pull/1505#discussion_r597326897
* Moving test to different config file
test1.yml runs out of memory
* Update according to comments
* Add safety clause to reading modes
* Fix clang-tidy complaint
* Revert change to i2c component
* Fix for changes in dev
* Revert "Revert change to i2c component"
This reverts commit 2810df59e9.
Co-authored-by: Otto winter <otto@otto-winter.com>
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
The original version uses write_byte to tranfer every byte of
the display buffer which is quite extensive as every byte needs
to be waited for in the SPI driver.
This patch prepares transfers in 64-byte chunks. The result is
a visible faster redraw of the display.
Co-authored-by: Otto winter <otto@otto-winter.com>
* Add support for Waveshare 7.5 inch (B) bichromatic display (black-and-white only for now)
* Use drawing commands specific to bichromatic displays
* Fix inaccurate comment
* Fix merge error
* Formatting
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>