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

Use piid-siid instead of did for mapping genericmiot responses #1620

Merged
merged 2 commits into from
Dec 6, 2022

Conversation

rytilahti
Copy link
Owner

@rytilahti rytilahti commented Dec 6, 2022

Some devices (like zhimi.heater.mc2) do not mirror the did back, so this converts to use the (siid, piid) combination for obtaining the property for generic miot responses.

Fixes #1619

@rytilahti rytilahti added the bug label Dec 6, 2022
@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2022

Codecov Report

Merging #1620 (f1d0db3) into master (db3c7ad) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1620      +/-   ##
==========================================
- Coverage   80.19%   80.19%   -0.01%     
==========================================
  Files         159      159              
  Lines       15711    15712       +1     
  Branches     3492     3493       +1     
==========================================
  Hits        12600    12600              
  Misses       2858     2858              
- Partials      253      254       +1     
Impacted Files Coverage Δ
miio/integrations/genericmiot/genericmiot.py 25.33% <0.00%> (-0.12%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pplucky
Copy link

pplucky commented Dec 6, 2022

Looking good now for zhimi.heater.mc2:

[S] Switch Status (heater:on): False
Device Fault (heater:fault): 0  (min: 0, max: 255, step: 1)
[S] Target Temperature (heater:target-temperature): 20 None (min: 18, max: 28, step: 1)
[S] Countdown Time (countdown:countdown-time): 0:00:00 (min: 0, max: 12, step: 1)
Temperature (environment:temperature): 19.4 None (min: -30, max: 100, step: 0)
[S] Physical Control Locked (physical-controls-locked:physical-controls-locked): False
[S] Alarm (alarm:alarm): False
[S] Brightness (indicator-light:brightness): 1 % (min: 0, max: 1, step: 1)
[S] 恒温功能使能 (private-service:hw-enable): False
用户使用时长 (private-service:use-time): 66253 None (min: 0, max: 2147483647, step: 1)
country-code (private-service:country-code): EU,欧洲 (value: 44) (from: 未知 (0), US, 美国 (1), KR,韩国 (82), EU,欧洲 (44), JP,日本 (81), RU,俄罗斯 (7), CN,中国 (86), 中国香港 (852), 中国台湾 (886), FR,法国 (33))

@rytilahti
Copy link
Owner Author

Great, thanks for testing and reporting @pplucky!

@rytilahti rytilahti merged commit e198638 into master Dec 6, 2022
@rytilahti rytilahti deleted the fix/handle_unexpected_dids branch December 6, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when using miiocli genericmiot for device zhimi.heater.mc2
3 participants