-
Notifications
You must be signed in to change notification settings - Fork 609
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
Added a device YAML file for the lightless Casafan Eco Genuino #2773
Conversation
This is identical to the already existing reiga_ceiling_fan config. I would add the new product in, but the product id does not appear to be correct (I think it is taken from "model id" returned by one of the cloud API functions, judging by the format, which is not the same as product id). |
Ok. I thought the Cloud model id in the answer of the PAI Query was the correct source. |
The product id is neither the device id, nor the model id. You can find the product id in the same Tuya cloud API functions that return the local key. You can also get it from the local discovery using Sometimes the local and cloud product ids are different (the local one seems to always start with "key" in these cases). Currently we only search for configs by product id when using the cloud config flow, so we will always have the cloud one in these cases, we may not have the local one if discovery is blocked by localtuya being installed or a complex network setup. |
Sincere apologies for not RTFM'ing. Did it with tinytuya:
Hope I'm doing it the right way now :-) |
The product id is also identical to the Reiga one, so they are obviously just rebadged. |
Identical product id, not sure if the German or the US brand is the original, or maybe they both use a control unit from another manufacturer. Closes PR #2773
Thanks. Sorry for generating time losses (four both of us). BTW, it would be nice if available YAMLs that precisely match the device (same DPs, same Product Id) could be clearly presnted as "matching". When I added the fan, I was presented with a list of several fans models, with just their stripped filenames. I selected the casafan one (with lights) hoping it would work based on the brand. Having matching DPs and ProductId could be enough to select the YAML 'automatically' possibly? Tuya Local is great! |
Usually the closest match is highlighted by default. In this case, there is also a Skyfan DC fan with exactly the same dps but only 5 speeds, which cannot be distinguished by a snapshot of current values alone, so it is possible that the Reiga one is not selected by default. The product id probably should be taken into account for this process, I guess it could be done by giving a product_id match a score of 101% instead of 100%, so it gets boosted above a perfect dps only match. |
A product id match signals a perfect match, but at 100% it does not appear any better than dps that happen to match. Also do not require all non-optional keys to match when the product id is already matched. A partial match is still likely to be the correct device. Only discard the match if there are mismatches in the dps types. PR #2773
The YAML file has been tested with the corresponding model (1.8 meters diameter model, it's possible that other diameters have different model ids). The information has been extracted from Tuya Cloud Platform.