Open slcr opened 3 years ago
I'd be happy to merge a PR that implements this. That being said, please test that it still works after since it doesn't properly works for me in https://github.com/cellcortex/homebridge-yeelighter/issues/67
@okonet Did you ever get to merging the yeelighter implementation into this project?
Yeelighter works fine for me in terms of brightness, but it doesn’t have the ability to change CT or adaptive lighting.
The way moonlight mode is implemented in this project is very smart, but unfortunately doesn’t work correctly in scenes or automations..
I didn’t merge it since the implementation differs too much. Also the way Yeelighter handles moonlight mode didn’t work for me in automations so I’m sticking with a separate switch (current implementation) which works great for me. What specific issue are you having with it?
I didn’t merge it since the implementation differs too much. Also the way Yeelighter handles moonlight mode didn’t work for me in automations so I’m sticking with a separate switch (current implementation) which works great for me. What specific issue are you having with it?
My issue is that I want to put the lamp in a scene, and toggle between my morning scenes (using daylight mode) and my evening/night scenes (using moonlight mode).. Toggling between daylight/moonlight seems to mess something up.
Have you found a way to do this successfully? In my case when I toggle on/off moonlight switch my lamp goes to 100% and doesn’t go down to whatever percentage is set in the scene..
I had similar issues and I’m still not sure what exactly causing it but it seems to be the order. What I’ve tried is adding only one characteristic to the scene first and then saving it. And then adding the second. Try doing it for both brightness and night switch in different order. The easiest way I figured out is to only use one characteristic at a time since unfortunately. The problem lies on the lights API and can’t be fixed with any software afaik. I had similar issues with the Yeelighter using it automations so 🤷🏻♂️
I also made sure that when switching modes the ambient light doesn’t get unset if it was enabled. What works well is setting brightness on the lamp beforehand and then only control the night mode.
That being said, I have a few ceiling lights that set both characteristics via scenes and it works flawlessly.
Ok, that's interesting.
I didn't play with it too much cause I assumed it just didn't work properly. I'll have a play when I get a second, and report back in a couple of days.
@okonet So I had a good play with it, and it seems that the lamp treats the sun/moon light modes as completely separate.
ie: for example, assuming you set brightness to 30% in moonlight mode, than change to sun mode, and change the brightness of that to 100%, when you toogle moon light back on, it will remember moonlight mode was at 30%.
That said, with the workaround you mentioned above, I have managed to get it to work, but it refuses to also change color temperature with the same scene.
As a workaround, would it not be possible for the plugin to recall what brightness% and CT the lamps are set to, and push it again to the lamp when moonlight mode is toggled/untoggled?
So if you change between either toggle, the same percentage would always be loaded back into the lamp until homekit asks for a different percentage.
Hope I’m explaining that clearly.
It’s actually what should happen now. The lamp remembers the previous setting of brightness and CT so it should just work. Currently when toggling the moonlight mode I make sure that the CT won’t be overridden to make ambient light work. Sometimes it doesn’t though but most of the time it does. I assume there are some firmware issues still in Yeelight that causing it but I cannot confirm since debugging is hard. Try setting your lamp into ambient light mode for CT and then toggle between moonlight mode. It should remain enabled.
I'm using a Yeelight Table Lamp Pro.
While I've managed to get the brightness to update, by making sure the brightness slider is adjusted after the Moonlight switch is toggled, I can't get the colour temperature to update unless I do it manually.
I've spent the past week playing around with it.. I can visually see the light change to 'day mode' then correct the brightness to what the scene is requesting, but for some reason, it completely ignores the request to change CT. I can't quite understand why, as if I move the CT slider around it then updates fine.
So you’re trying to update all three in one scene? Because this light be a problem: the CT change is ignored while in moonlight since it doesn’t have an effect and to not mess up the daylight setting. Try making two scenes and control moonlight only in the first one and then after a delay to set brightness and CT. You could use a shortcut to set a small delay in between for example.
Feature Request i'd love to see an option to change Moonlight Mode to a passive toggle:
This would help prevent the extra click or separation of tiles for each lamp. I hate the implementation of moonlight mode as yeelight did it, because between 100% moonlight mode and 1% non-moonlight mode is a huge gap in brightness, but i guess thats just the way it is…
i hope this is the right way of requesting a feature 😬