-
-
Notifications
You must be signed in to change notification settings - Fork 20
Add lightbulb option #66
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
base: master
Are you sure you want to change the base?
Conversation
This lets us adjusting the percentage of the lightbulb as per the number of units we want the timer to work. When setting `"actAsBulb": true`, the delay becomes the unit (e.g. `"delay": 1000` = 1 second, `"delay": 60000` = 1 minute) that will be multiply by the percentage of the lightbulb.
This lets us adjusting the percentage of the lightbulb as per the number of units we want the timer to work. When setting `"actAsBulb": true`, the delay becomes the unit (e.g. `"delay": 1000` = 1 second, `"delay": 60000` = 1 minute) that will be multiply by the percentage of the lightbulb.
I'll merge if it will be adapter to recent changes in the main branch |
@nitaybz The conflicts has been resolved. |
sorry but i made some minor updates that will require conflicts to be resolved.
To sum it up, I think a great representation of a lightbulb in this plugin would be to both allow activating the timer for part of the time while also understanding how much time left by looking at the percentage of the brightness. Let me know you thoughts, thanks |
@nitaybz I think the method presented by @Idomo is better and simpler.
The basic timer unit is currently given in Model name. So, for example, 5 seconds. Then it is known that if you set 10 units it will be 50 seconds. |
The issue with it is that in HomeKit it's extremely hard to set a very specific percentage, for example 1% almost impossible. I rather have the 100% as the delay and the ability to activate partially |
But this is mainly for automation - there you set it only once. Or to control with Siri. I still find @Idomo's solution better and simpler! |
|
@nitaybz I understand your perspective, but it's limiting the timer to a specific time that has to be defined in the HomeBridge settings, and this is what @mkz212 is trying to explain here; If you need only one specific time then you can always define a unit that will be divided by 100 and go with your approach, but it isn't the original intention here. About the conflicts - I see that you just ran ESLint, so please revert this commit, merge my pull request and run it again (so it'll also be applied on the new code). |
@nitaybz I suggest to give it a try and release @Idomo solution as a beta and we'll see. But I would change one thing right away. Instead of Bool - one of - i.e. the choice of type - switch, light. This will be useful if you add another type in the future. For example, you can immediately add an outlet as another type. |
This is an adjustment for #44 that updated for the latest version of this plugin and allows more flexibility.
This lets us adjusting the percentage of the lightbulb as per the number of units we want the timer to work.
When setting
"actAsBulb": true
, the delay becomes the unit (e.g."delay": 1000
= 1 second,"delay": 60000
= 1 minute) that will be multiply by the percentage of the lightbulb.This is very useful for adding timers via Siri Shortcuts that requires delay that the user choosing on each activation of the shortcut (e.g. "turn on boiler for X minuets" may differ depends on the current temperature, how long is the shower etc.)