python-miio icon indicating copy to clipboard operation
python-miio copied to clipboard

Roborock: Add WiFi signal strength sensor

Open SLaks opened this issue 1 year ago • 3 comments

Re: https://github.com/rytilahti/python-miio/pull/1914#discussion_r1531240944

All I have is Q Revo and S7 (both cloud connected); I don't know about other devices.

Options include:

  • Store prior info() failures and skip this if it fails
  • Only call add_update_method(connectivity_status) if the WiFi strength sensor is enabled in HA (requires a more complex refactor)
  • Move this sensor to a separate feature in the base class, independent of status classes and everything else (would decouple async work, and may make it easier to implement the previous bullet)

SLaks avatar Mar 20 '24 00:03 SLaks

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.42%. Comparing base (8643a57) to head (fd973a0).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1918      +/-   ##
==========================================
+ Coverage   81.41%   81.42%   +0.01%     
==========================================
  Files         193      193              
  Lines       18636    18648      +12     
  Branches     4045     4049       +4     
==========================================
+ Hits        15173    15185      +12     
  Misses       3180     3180              
  Partials      283      283              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 20 '24 00:03 codecov[bot]

Update: As I ran the vacuum, this sensor never changed.

I'm not sure whether that means my implementation is incorrectly caching, or whether the vacuum reports stale data.

SLaks avatar Mar 20 '24 14:03 SLaks

I tried using https://github.com/marcelrv/XiaomiRobotVacuumProtocol/blob/master/network_info.md instead, and watched it print the same value in the terminal as the vacuum moved halfway across the house.

Either my WiFi coverage is literally perfect (which seems very unlikely) or the vacuum doesn't actually make this possible.

Confusingly, my S7 reports 0, even after rebooting somewhere else.

SLaks avatar Mar 20 '24 15:03 SLaks