Open mandreko opened 2 months ago
Hey there @matrixd2, mind taking a look at this issue as it has been labeled with an integration (yolink
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
yolink documentation yolink source (message by IssueLinks)
When adding support for this type of device, the API did not expose the device model, So the differences between models were not addressed.
The problem
I purchased the YoLink YS6802 weatherproof smart plug for my outdoor fountain and lights. It has 2 electrical outlets on it. I added it to the YoLink app, and it's working as intended.
However, when I reloaded the YoLink HomeAssistant integration, it discovered the device but has mapped incorrect controls to it. Instead of 2 electrical outlets, it shows 4 electrical plugs, and a USB port. By triggering the switches in the YoLink app, I identified that the switch labeled "1" on the physical device ties to the "USB ports" switch in HA, and the "2" switch lines up with "Plug 1". Plugs 2-4 seemingly do nothing, but turn themselves off shortly after turning them on.![image](https://github.com/home-assistant/core/assets/419731/7b08e826-3a64-4737-a2b4-ea608d915f18)
I'm guessing this is probably just a weird mapping issue with this specific model in the code, but I'm really unsure. I started looking into the source, but my Python abilities are limited. I found the plug name definitions here https://github.com/home-assistant/core/blob/dev/homeassistant/components/yolink/strings.json#L46 but then wasn't sure where they were defined or how they were mapped to this specific model :( Maybe somewhere near here? https://github.com/home-assistant/core/blob/80e9ff672a7bbf706d8503b3a41ee1fefd958039/homeassistant/components/yolink/switch.py#L60-L94
What version of Home Assistant Core has the issue?
core-2024.5.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
YoLink
Link to integration documentation on our website
https://www.home-assistant.io/integrations/yolink/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response