Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for the DFRobot EC sensor.
In order to give an accurate reading, the EC sensor requires the current temperature. This PR also adds the EventBus argument to the setup_sensor function, so that sensors can query the event bus and read the value of other sensors. This has required changing the setup_sensor call for all sensors.
For the sensor to function properly, it needs to be plugged into an ADC. The DFRobot DRF0566 HAT has the correct connectors and an integral ADC, so this PR includes the addition of the code for the HAT and the ADC in the
mqtt_io/modules/sensor/drivers
folder. This is added separately so that it can be used by other sensors as there are many sensors from DFRobot that could be added trivially using this driver.