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

Support for light devices #132

Closed

Conversation

make-all
Copy link

This PR adds support for lights with IR or RF remote controls.

Support for color temperature and brightness control is provided, with the assumption that each function is driven by "up" and "down" commands. When color temperature or brightness is set to the end of the range, more commands than necessary are deliberately issued to attempt to resync the light in case the remote has been used.

Initial configuration is for an Iris Ohyama dome ceiling light sold in Japan. In addition to the 10 step brightness and color temperature controls, this light also contains a nightlight, which is turned on by setting brightness to 1 (0.4%, which cannot be mistakenly selected in the UI, as that only goes down to 1%). It also contains a memory feature, which is used to have better control over the turn-on brightness and color temperature, and an off timer feature which is not implemented here.

Further configurations are provided for an NEC dome ceiling light, a channel switch inside the remote - configs for both channel settings are provided, a Toshiba dome ceiling light, and a Takizumi dome ceiling light which I had available to me.

Note: The icon may be using a slightly different font than the others, and should probably be redone by someone who knows the details of how the others were made to be consistent.

Supports commands for on/off, brighten/dim, colder/warmer and night.
Start with a configuration for an Iris Ohyama light.
Probably artifacts of the rebase, as formatting was improved on the
new repo.

@callback
async def _async_power_sensor_changed(self, event):
):

Check failure

Code scanning / CodeQL

Syntax error Error

Syntax Error (in Python 3).
Following same pattern as other platforms.
I thought I was already testing this version in production, but must have
missed something
@make-all
Copy link
Author

I'm withdrawing this, as the changes to this fork are substantial, so it needs more work to adapt.
Currently I do not have time to figure out all the changes needed.

@make-all make-all closed this Sep 20, 2024
@litinoveweedle
Copy link
Owner

Hello, that's a pity, I would be glad if this extension would land in. Would you mind if I will try to pick this from your repo and try to make it compatible?

@make-all
Copy link
Author

You are welcome to try. I was going to have another look at it in the next few weeks when I get time, clean it up and resubmit, but you may be able to clean it up quicker, given that you know what changes have been made before.

It looks like there is some config file checking added, which will need doing at least.

@litinoveweedle
Copy link
Owner

yep, for sure a lot of changes were done. I did merged your changes into light branch in my repo and made some initial refactoring to align with current changes. I did not tested it so far. You can check it out.

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.

2 participants