danobot / entity-controller

Home Assistant Entity and lighting controller for managing devices with timers, scripts, and sun-based time restrictions.
https://danobot.github.io/ec-docs/
GNU General Public License v3.0
299 stars 40 forks source link

Add possibility to manually enable blocked state #290

Closed PiotrMachowski closed 2 years ago

PiotrMachowski commented 2 years ago

Description

This pull requests adds entity_controller.enable_block service that allows to manually enable blocked state.

Thanks to this feature it will be possible to prevent entity from being automatically turned off - in my use case I use it to block light in a bathroom when its door is closed and a presence of a person inside is detected (e.g. by clicking a button).

Checklist

Please open an issue before embarking on any significant pull request, especially those that add a new library or change existing tests, otherwise you risk spending a lot of time working on something that might not end up being merged into the project.

License

By submitting a patch, you agree to allow the project owners to license your work under the terms of the project license. Thank you for contributing!

Related Issues

Closes #237, #277

hvorragend commented 2 years ago

Perfect. This works great for me.

danobot commented 2 years ago

Testing on my instance and will merge if all good. Thanks

danobot commented 2 years ago

Merged and released, thank you for your contribution. If there is anything to document, please update the documentation repo and I'll merge that as well.