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

Fix json output handling for genericmiot #1674

Merged
merged 1 commit into from
Jan 15, 2023

Conversation

rytilahti
Copy link
Owner

This fixes the json output for genericmiot.

❯ miiocli --output json genericmiot --ip 127.0.0.1 --token 00000000000000000000000000000000 status|jq
{
  "vacuum:status": 6,
  "vacuum:fault": 1139,
  "vacuum:mode": 1,
  "vacuum:sweep-type": 2,
  "vacuum:on": "piid 9",
  "battery:battery-level": 66,
  "alarm:alarm": 1,
  "alarm:volume": 4,
  "sweep:repeat-state": 0,
  "sweep:door-state": 3,
  "sweep:cloth-state": 0,
  "sweep:suction-state": 2,
  "sweep:water-state": 1,
  "sweep:mop-route": 0,
  "sweep:side-brush-life": 53,
  "sweep:side-brush-hours": 21,
  "sweep:main-brush-life": 15,
  "sweep:main-brush-hours": 98,
  "sweep:hypa-life": 93,
  "sweep:hypa-hours": 45,
  "sweep:mop-life": 99,
  "sweep:mop-hours": 35,
  "sweep:time-zone": -81734,
  "sweep:cur-lang": "piid 21",
  "sweep:cleaning-time": 62,
  "sweep:cleaning-area": 708,
  "sweep:multi-prop-vacuum": "piid 45",
  "sweep:tank-shake": 1,
  "sweep:shake-shift": 3,
  "order:all-enable-count": "piid 18",
  "point-zone:target-point": "piid 5",
  "map:remember-state": 0,
  "map:cur-map-id": 1577155194,
  "map:map-num": 5,
  "map:cur-cleaning-path": "piid 5",
  "map:build-map": 0,
  "map:has-new-map": 0,
  "disturb:dnd-enable": 0,
  "disturb:dnd-start-hour": 1,
  "disturb:dnd-start-minute": 4,
  "disturb:dnd-end-hour": 8,
  "disturb:dnd-end-minute": 9,
  "disturb:multi-prop-dnd": "piid 7"
}

@rytilahti rytilahti added the bug label Jan 15, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2023

Codecov Report

Merging #1674 (1ed823d) into master (1462e11) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1674      +/-   ##
==========================================
- Coverage   80.04%   80.01%   -0.03%     
==========================================
  Files         161      161              
  Lines       16131    16136       +5     
  Branches     3635     3637       +2     
==========================================
  Hits        12912    12912              
- Misses       2956     2960       +4     
- Partials      263      264       +1     
Impacted Files Coverage Δ
miio/devicestatus.py 89.15% <0.00%> (-2.21%) ⬇️
miio/integrations/genericmiot/genericmiot.py 25.35% <0.00%> (-0.37%) ⬇️

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

@rytilahti rytilahti force-pushed the fix/genericmiot/json_output branch from 594a163 to 1ed823d Compare January 15, 2023 03:48
@rytilahti rytilahti merged commit 6e12e5c into master Jan 15, 2023
@rytilahti rytilahti deleted the fix/genericmiot/json_output branch January 15, 2023 03:55
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.

2 participants