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

Allow custom methods for miio simulator #1538

Merged
merged 3 commits into from Sep 26, 2022
Merged

Conversation

rytilahti
Copy link
Owner

@rytilahti rytilahti commented Sep 26, 2022

This will allow simulating devices that do use other methods besides "get_prop" for fetching the properties.

The result can be defined either as regular yaml object (result) or as json string (result_json).

Added simulated roborock s7 as an example case, looks like the status container embedding is working as expected (@starkillerOG):
image

This will allow simulating devices that do use other methods besides "get_prop" for fetching the properties.

Added simulated roborock s7 as an example case.
@rytilahti rytilahti changed the title Allow custom responses for miio simulator Allow custom methods for miio simulator Sep 26, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2022

Codecov Report

Merging #1538 (8ea1a67) into master (a1ff575) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1538      +/-   ##
==========================================
- Coverage   81.95%   81.88%   -0.07%     
==========================================
  Files         149      149              
  Lines       14594    14605      +11     
  Branches     3550     1660    -1890     
==========================================
  Hits        11960    11960              
- Misses       2387     2398      +11     
  Partials      247      247              
Impacted Files Coverage Δ
miio/devtools/simulators/miiosimulator.py 0.00% <0.00%> (ø)

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

@rytilahti rytilahti merged commit f4abd59 into master Sep 26, 2022
@rytilahti rytilahti deleted the feat/improve_miio_simulator branch September 26, 2022 18:31
@starkillerOG
Copy link
Contributor

@rytilahti I now also tested the embeded status container with a real vacuum, it seems to work, but there is some issue with the getatrributes see #1542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants