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
289 stars 41 forks source link

Add possibility to manually enable blocked state #290

Closed PiotrMachowski closed 1 year ago

PiotrMachowski commented 1 year 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 1 year ago

Perfect. This works great for me.

danobot commented 1 year ago

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

danobot commented 1 year 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.