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

[tuya] Separate Power / Switch channel for lights #339

Closed
jimtng opened this issue Mar 7, 2022 · 4 comments
Closed

[tuya] Separate Power / Switch channel for lights #339

jimtng opened this issue Mar 7, 2022 · 4 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@jimtng
Copy link
Contributor

jimtng commented Mar 7, 2022

I noticed that for a lightbulb item, the binding creates color and dimmer channels that have dp2 linked to on/off. However, there's no separate on/off channel by itself to allow me to turn the light on/off without changing the color/dimmer value.

Would you create a separate channel for this please?

@BigGeorgeTx
Copy link

I will let the developers respond to your programming request. I have found that I can manually at the on/off channel by finding the switch DP in the dimmer channel and then creating a new switch channel and giving it that DP. It works well. I agree it would be great if the binding did it automatically.

@J-N-K J-N-K added enhancement New feature or request wontfix This will not be worked on labels Mar 26, 2022
@J-N-K
Copy link
Member

J-N-K commented Mar 26, 2022

In general openHAB tried to avoid unnecessary channels. You can send ON or OFF commands via a switch to the color/dimmer channel and only on/off is transmitted to the device, so the stored brightness/color of the device stays unchanged.

Adding the channel would be inconsistent with all other bindings, which do not provide such a channel in the same situation (like hue, deconz, etc.).

If you really need an addition switch channel, you can use the workaround suggested by @BigGeorgeTx.

@J-N-K J-N-K closed this as completed Mar 26, 2022
@jimtng
Copy link
Contributor Author

jimtng commented Mar 26, 2022

I didn't know that a Dimmer item would send a separate ON/OFF. I thought ON is translated to 0 and ON to 100, and therefore it would lose its brightness setting. This is how it is with mqtt (afaik) and tasmota, the Dimmer channel is dimmer (0-100) and power is on/off. Sending OFF to dimmer simply sends 0 to Tasmota's dimmer value.

If the Tuya binding actually sends ON/OFF on the dimmer, I guess I could just link the channel to two items: one a SwitchItem for on/off and one Dimmer, and then it would work the way I'm accustomed to, without even having to use the workaround suggested by @BigGeorgeTx. WDYT?

I haven't used the Tuya binding and I have reverted back to using tuya-mqtt because the binding hasn't been stable for me, and I haven't had a chance to troubleshoot all the issues.

@J-N-K
Copy link
Member

J-N-K commented Mar 26, 2022

Yes, it should be possible to link two items to the channel. If you experience problems, please open an issue for that. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants