* 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>