The problem
Title: RTK base station position_mode sensor decodes fix quality with RTKPositionMode enum
Description
The RTK base station exposes a position_mode sensor that reports a link mode (RTK_OVER_DATALINK / RTK_OVER_INTERNET), but the underlying field is the base station's RTK fix quality, not a link mode. The two values are decoded with the same enum, so the sensor shows a plausible-looking but incorrect state.
Details
There are two position_mode sensors, sourced from different fields:
- Mower device —
custom_components/mammotion/sensor.py (~line 376):
value_fn=lambda mower_data: RTKPositionMode(
mower_data.report_data.basestation_info.rtk_status
).name
This is correct. RTKPositionMode documents itself as decoding rpt_basestation_info.rtk_status, referencing SignalHelper.RTKPositionModeType from the APK.
- RTK base station device —
custom_components/mammotion/sensor.py (~line 583):
value_fn=lambda rtk_data: RTKPositionMode(rtk_data.rtk_status).name
Here rtk_data is RTKBaseStationDevice. Its rtk_status field is documented in pymammotion/data/model/device.py as coming from base.to_app (ResponseBasestationInfoT) and meaning "RTK fix quality". The same docstring explicitly notes that the mower-side relay data lives on MowerDevice.report_data.basestation_info and not on this model.
So the same attribute name carries different semantics in the two structures, and the base station's fix quality is being decoded as a link mode.
Impact
On my setup the app is configured for "RTK over Datalink":
sensor.<mower>_position_mode → RTK_OVER_DATALINK (correct)
sensor.<rtk>_position_mode → RTK_OVER_INTERNET (incorrect)
A raw value of 1 maps to RTK_OVER_INTERNET in RTKPositionMode, while in RTKStatus the same value would be SINGLE. The sensor is misleading because the wrong value looks like a legitimate configuration state rather than an obvious error.
Suggested fix
Either decode RTKBaseStationDevice.rtk_status with the fix-quality enum (RTKStatus) and rename the sensor key accordingly (e.g. rtk_fix_quality), or drop the sensor if the field is not reliably interpretable. I could not determine from the code whether this field follows the RTKStatus value scale (0/1/2/4/5) or a different one — the docstring only says "fix quality" — so that likely needs confirmation against the APK or device traces.
Environment
- Device: Luba mini 800 + RTK base station
- RTK link mode configured in app: RTK over Datalink
- Home Assistant: 2026.8.2
- Mammotion-HA: v0.6.4
What Mammotion device are you using?
Luba mini AWD 800
What version of the Mammotion integration are you using?
v0.6.4
What version of Home Assistant Core are you running?
core-2026.8.2
The problem
Title: RTK base station
position_modesensor decodes fix quality withRTKPositionModeenumDescription
The RTK base station exposes a
position_modesensor that reports a link mode (RTK_OVER_DATALINK/RTK_OVER_INTERNET), but the underlying field is the base station's RTK fix quality, not a link mode. The two values are decoded with the same enum, so the sensor shows a plausible-looking but incorrect state.Details
There are two
position_modesensors, sourced from different fields:custom_components/mammotion/sensor.py(~line 376):This is correct.
RTKPositionModedocuments itself as decodingrpt_basestation_info.rtk_status, referencingSignalHelper.RTKPositionModeTypefrom the APK.custom_components/mammotion/sensor.py(~line 583):Here
rtk_dataisRTKBaseStationDevice. Itsrtk_statusfield is documented inpymammotion/data/model/device.pyas coming frombase.to_app(ResponseBasestationInfoT) and meaning "RTK fix quality". The same docstring explicitly notes that the mower-side relay data lives onMowerDevice.report_data.basestation_infoand not on this model.So the same attribute name carries different semantics in the two structures, and the base station's fix quality is being decoded as a link mode.
Impact
On my setup the app is configured for "RTK over Datalink":
sensor.<mower>_position_mode→RTK_OVER_DATALINK(correct)sensor.<rtk>_position_mode→RTK_OVER_INTERNET(incorrect)A raw value of
1maps toRTK_OVER_INTERNETinRTKPositionMode, while inRTKStatusthe same value would beSINGLE. The sensor is misleading because the wrong value looks like a legitimate configuration state rather than an obvious error.Suggested fix
Either decode
RTKBaseStationDevice.rtk_statuswith the fix-quality enum (RTKStatus) and rename the sensor key accordingly (e.g.rtk_fix_quality), or drop the sensor if the field is not reliably interpretable. I could not determine from the code whether this field follows theRTKStatusvalue scale (0/1/2/4/5) or a different one — the docstring only says "fix quality" — so that likely needs confirmation against the APK or device traces.Environment
What Mammotion device are you using?
Luba mini AWD 800
What version of the Mammotion integration are you using?
v0.6.4
What version of Home Assistant Core are you running?
core-2026.8.2