Skip to content

Release 1.4.0#54

Merged
bvweerd merged 23 commits into
mainfrom
dev
Jun 23, 2025
Merged

Release 1.4.0#54
bvweerd merged 23 commits into
mainfrom
dev

Conversation

@bvweerd
Copy link
Copy Markdown
Owner

@bvweerd bvweerd commented Jun 23, 2025

No description provided.

bvweerd and others added 23 commits June 17, 2025 12:45
Adapt tests
	new file:   custom_components/simple_pid_controller/select.py
	modified:   custom_components/simple_pid_controller/sensor.py
In some cases factors less than 0.01 are useful to make the PID response
slower.

Reduce the minimum step to 0.001.
Allow specifying gain factors step size 0.001 instead of 0.01
We give out the intended sample time out to simple_pid, which uses it to
filter out calls that happen too often.

However, we often call simple_pid a fraction of a second sooner than it
expects, causing the entire PID loop iteration to be skipped.

In my test system this happens on almost every round, causing my
60-second PID controller to effectively only update every 120 seconds.

Since we already only call simple_pid every sample_time seconds, there
is no need to keep the simple_pid's filtering check in place. The
filtering check is the only thing simple_pid uses the sample_time value
for, so we can simply omit giving out our sample_time to it.
Fix the PID controller to follow the set sample time (PR#49 replacement)
@bvweerd bvweerd merged commit 50a7b9e into main Jun 23, 2025
8 checks passed
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.

2 participants