Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Allow sample rate overrides for T/P/H sensors #41

Merged
merged 1 commit into from
May 4, 2021
Merged

Conversation

trvrnrth
Copy link
Owner

@trvrnrth trvrnrth commented May 4, 2021

This allows for the common request of being able to run the
gas-dependant sensors/calculations in ULP mode with more frequent
LP temperature/pressure/humidity readings.

In that setup the heater only runs every 5 minutes reducing
consumption but still allowing highly reactive T/P/H readings.

Other combinations are also possible but they'll not be so useful.

If no per-sensor overrides are given then they will run at the sample
rate configured at platform level.

Also included in this PR are some tidy-ups to:

  • improve code readability and formatting
  • clear up a compile time warning relating to gate-keeper define
  • add a couple of extra sensor status safety checks
  • specify sensor device classes

This allows for the common request of being able to run the
gas-dependant sensors/calculations in ULP mode with more frequent
LP temperature/pressure/humidity readings.

In that setup the heater only runs every 5 minutes reducing
consumption but still allowing highly reactive T/P/H readings.

Other combinations are also possible but they'll not be so useful.

If no per-sensor overrides are given then they will run at the sample
rate configured at platform level.

Also included in this commit are some tidy-ups to:
- improve code readability and formatting
- clear up a compile time warning relating to gate-keeper define
- add a couple of extra sensor status safety checks
- specify sensor device classes
@trvrnrth trvrnrth merged commit fafc70d into master May 4, 2021
@trvrnrth trvrnrth deleted the add-sample-rates branch May 4, 2021 11:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant