Skip to content

Conversation

linucks
Copy link
Contributor

@linucks linucks commented Mar 24, 2025

This adds support for the DFR0300 EC sensor

The sensor needs an ADC, so this PR also adds support for the DFRobot DFR0566 Raspberry PI expansion HAT, which is then available to any other sensors that require it, and provides pin sockets for DFRobot Analog, Digital, I2C, PWM preipherals.

As the DFR0566 is effectively a driver, it has been added to a separate drivers directory in the sensors directory so it can be used by other sensors, and other driver code could be added as needed.

For optimal accuracy, the DFR0300 needs to read the current temperature from another sensor, so this PR also adds the event_bus argument to setup_sensor, so that in future, all sensors will be able to query the event bus for any events they may need to subscribe to.

This has required changing the code for all other sensors that call setup_sensor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant