Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary fencing interfering with delayed_off #117

Merged
merged 3 commits into from
Aug 3, 2024

Conversation

thexperiments
Copy link
Contributor

As the check for the state returns true as long as the delayed_off time has not passed it will not trigger a publish_state that will reset the delay time. This results in the occupancy turning off after the delay_time has passed and immediately turns back on in the next cycle as the publish_state is not fenced anymore.

To fix this I simply removed the check for the state before the state is published as esphome already has deduplication built in for binary sensors (see binary_sensor.cpp#L15)

@thexperiments
Copy link
Contributor Author

thexperiments commented Jul 18, 2024

bump @EverythingSmartHome I guess this fix would make other ep lite owners happier too. Really wondering why nobody was complaining yet.

@EverythingSmartHome
Copy link
Owner

Sorry for the delay, had some time to test tonight. Looks good to me, thanks!

@EverythingSmartHome EverythingSmartHome merged commit ec8f5e8 into EverythingSmartHome:main Aug 3, 2024
30 checks passed
@Chaphasilor
Copy link

So that's what happened... Thanks for the fix!

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.

3 participants