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

New device: Mercator Ceiling Fan/Light Combo + Odd behaviour #116

Closed
phrak opened this issue Jan 26, 2024 · 14 comments
Closed

New device: Mercator Ceiling Fan/Light Combo + Odd behaviour #116

phrak opened this issue Jan 26, 2024 · 14 comments
Labels
auto configure Related to auto configure entities feature.

Comments

@phrak
Copy link

phrak commented Jan 26, 2024

Running Master version: 4afac6c

Hi again,
Thanks for your ongoing supportI have a new device to request being added to the repository please.

Mercator Minota Ceiling Fan with Light (Part of the Ikuu range)
https://www.ikuu.com.au/product/minota-dc-ceiling-fan/

I have created a template and downloaded the debug information for the device.

Mercator Fan-Light debug.json.txt
Mercator Minota Ceiling Fan with Light Template.yaml.txt

I have basic control of the light on/off and fan on/off, but unfortunately I'm running into some problems controlling the fan and light entities. The light's brightness slider and the fan's speed slider don't really work very well.

The light brightness bar shows a low value like 7% or 11%, but the light is actually on 100% bright.
The light brightness control is also quite sporadic and doesn't always work.

The fan speed control behaves in a similar way. It always shows a low value like 11%, but I can't actually change the fan speed at all.

For full info, the fan speed control on the Tuya SmartLife app is an integer 1-6 (low to high), not a slider bar.
Maybe this is some reasons for the problem?

I have attached the debug log below.
This debug starts at line 1041.

home-assistant_localtuya_2024-01-26T10-46-26.880Z.log

Would you have any thoughts about the issue please?

Thanks in advance.

@xZetsubou
Copy link
Owner

xZetsubou commented Jan 26, 2024

Hello, it seems you configured the device incorrectly, judging from the fan debug.
Light:
Your light brightness min is 0 or 1, and max is "100"

Fan:
Your fan max speed is "6" you insert "9"

Try set the DP Type to int.

image

@phrak
Copy link
Author

phrak commented Jan 27, 2024

Thank you, that worked perfectly!

Here is the updated Template and debug files attached.
Mercator Fan-Light Debug.json.txt

Mercator Minota Ceiling Fan with Light Template.yaml.txt

Could you consider adding this device to your base code please?

@xZetsubou
Copy link
Owner

xZetsubou commented Jan 27, 2024

The device category already existed, have you tried auto configure option?

@xZetsubou xZetsubou added the auto configure Related to auto configure entities feature. label Jan 28, 2024
@phrak
Copy link
Author

phrak commented Jan 28, 2024

Oh cool - OK, that's great.
Yes I did try the auto-config at the time, but it Errored out when I was trying to auto-discover the device, so I had to add it manually. That's why I created the template.

However, I was using a previous Master code-base at the time, so it may have been fixed in a recent update.

Thanks - I'll assume there is nothing of value to update in the code then :)

@xZetsubou
Copy link
Owner

There is an issue that auto-configure is by default it will use "str" not "int", I'll need to check that.

xZetsubou added a commit that referenced this issue Jan 28, 2024
@phrak
Copy link
Author

phrak commented Jan 29, 2024

Updated Device Template to set the "Mode" correctly:

Mercator Minota Ceiling Fan with Light.yaml.txt

@phrak
Copy link
Author

phrak commented Jan 30, 2024

Closing this issue as fixed in 626be63

@phrak phrak closed this as completed Jan 30, 2024
@phrak
Copy link
Author

phrak commented Feb 25, 2024

Hi @xZetsubou - An odd issue here please.

Issue: Missing entities when the device is added using a device template.

To reproduce:

  1. Auto-discover 1 fan - It finds 4 DPIDs and adds the device fine.
    Minor bug: The discovered light control friendly name is called 'Null'
    Suggested names should be: "Fan Control" and "Light Control"

image

  1. Then I reconfigure the device (no changes) and export the device Template to YAML.
    Left_Outdoor_Ceiling_Fan.yaml.txt

  2. Then I add a new device, choosing to configure the device using a Template.

  3. I select the exact same Template that was just exported.

  4. The new device only shows 2 DPIDs.

image

Any thoughts please?

Thanks in advance.

@xZetsubou
Copy link
Owner

I will assume that the new select method I made might broke the select? however do mind to post the device diagnostics after you add it with template?

@phrak
Copy link
Author

phrak commented Feb 25, 2024

Quite possibly.
The select array is different between the two files.

This one was AutoDiscovered:
localtuya-d6d1c62282b4cf4e32f66d2628357f28-Left Outdoor Ceiling Fan-19e14999199b87ddabe2a12c7b9b3e19.json

This one was added with the template::
localtuya-d6d1c62282b4cf4e32f66d2628357f28-Right Outdoor Ceiling Fan-6ebde4564978f7a9335d17419843a2cf.json

@xZetsubou
Copy link
Owner

Yeah it seems it doesn't load the dict type like it should from templates, however the names "null" means there is no name which also mean it will use the "device" name for that entity.

@phrak
Copy link
Author

phrak commented Feb 25, 2024

Yeah ok, I'll leave that one with with you then :)

I can fix both issues manually with a multi-step approach:

  1. AutoDiscover the device

  2. Reconfigure the device and rename the entities as "Fan Control" and "Light Control".

  3. Everything looks normal in the select arrays
    image

  4. All entities are visible
    image

I only came across this issue because I needed to remove and re-add my devices after I changed the WiFi SSID.

@xZetsubou
Copy link
Owner

it should be fixed.

@phrak
Copy link
Author

phrak commented Feb 25, 2024

Works perfectly now with Master cf696df

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto configure Related to auto configure entities feature.
Projects
None yet
Development

No branches or pull requests

2 participants