* Correct implementation of comparisons to be Pythonic
If a comparison cannot be made return NotImplemented, this allows the
Python interpreter to try other comparisons (eg __ieq__) and either
return False (in the case of __eq__) or raise a TypeError
exception (eg in the case of __lt__).
* Python 3 updates
* Add a more helpful message in exception if platform is not defined
* Added a basic pre-commit check
* Split the SGP30 baseline into 2 values
- According to the SGP30 datasheet, each eCO2 and TVOC baseline is a 2-byte value (MSB first)
- The current implementation ignores the MSB of each of the value
- Update the schema to allow 2 different baseline values (optional, but both need to be specified for the baseline to apply)
* Make both eCO2 and TVOC required if the optional baseline is defined
* Make dump_config() looks better
Handling of request arguments in WizardRequestHandler is not decoding
bytes and rather just doing a str conversion resulting in a value of
"b''" being supplied to the wizard code.
Don't try to update CT clamp's state with NaN values returned from the
underlaying sensor. A single IO error in the sensor code will cause a
NaN to be returned and if we use that in CTClampSensor's floating point
maths both sample_sum_ and offset_ will become NaN and from there every
future calculation will use the NaN offset_ and return NaN too.
* Add RFBridge component
* Fix format issues
* Rename methods
* More formatting
* Fix line length
* Apply suggestions from code review
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* Check uart settings on dump
* Make receiving local to the loop
* FIx code order and schema
* Add rf_bridge to test file
* Apply suggestions from code review
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* Handle yaml merge keys correcly.
* Removed old debug bool.
* Deleted after request from @OttoWinder.
* Small refactoring.
Removed unused variable `value`
Small refactoring to make the code clearer.
Added comments.
* Fix merge sequence edge case
* Update ESP32 BLE ADV parse to match BLE spec
* Update xiaomi
* Update ruuvi
* Format
* Update esp32_ble_tracker.cpp
* Fix log
* Format
* Update xiaomi_ble.cpp
* Add support for Sensirion SPS30 Particulate Matter sensors
* Remove blocking of the main thread on initialization;
Improve wording on the debug messages;
Add robustness in re-initialization of reconnected or replaced sensors;
* Fix code formatting;
Co-authored-by: Nad <valordk@github>
* Add QMC5883L and Updated HMC5883L
* add tests
* changed to oversampling
* fix pylint
* fix private method
* typo fix
* fix protected method
* Clean up code and PR recomendations
* fix tests
* remote file
* fix qmc oversampling unit
* Remove hmc5883l config logging
Either the units are converted to the user values like 1x, 8x oversampling or not printed at all. Printing the machine-value of these is only confusing users.
* Changes for validate_enum
Move stuff that can be done beforehand out of the bound function, use text_type for py2/3 compatability.
* Remove unused constant
* Remove duplicate tests
* Repeat remove config print
* remove changes to test2 since bin is to large
* Add comment to HMC5583L
Co-authored-by: Timothy Purchas <timothy@TPF.local>
Co-authored-by: Otto Winter <otto@otto-winter.com>
In a heavy EMI environment, reading the current config from the MAX31865 can
fail, such as switching from a 4-wire sensor to a 3-wire sensor. This causes
the temperature value to be off wildly, but still technically valid, so it
doesn't get reported as a sensor failure.
Since we know what configuration we want, rather than send it to the MAX31865
on setup and ask for it over and over (propagating any error as we write it
back), instead store the base configuration and work from that to change modes.
This not only avoids propagating any error, it also saves a lot of unnecessary
reads from the MAX31865.