Remove valid check from obstruction status data

Remove the validity check that was gating the reporting of the obstruction_duration and obstruction_interval data items.

When that got added to the grpc protocol, I assumed that the valid flag meant whether the other 2 fields were useful data. That may actually have been the intent, for all I know, but I've never seen that flag report true. However, I also never saw the banner in the app telling me I would get obstructions every X minutes, either. That is, until a few weeks ago, probably due to a dish firmware change. Now I see the app reporting this data, so it must be ignoring that valid flag, or at least not using it for that purpose.

Probably nobody cares about this data (including me), given that nobody ever complained about it always reporting empty values, but I don't want to remove it and mess up db schemas, so it might as well be populated.
This commit is contained in:
sparky8512 2022-02-19 16:16:54 -08:00
parent 32567059b8
commit 9ca1a8a51c

View file

@ -618,12 +618,8 @@ def status_data(context=None):
if field.number < 65:
alert_bits |= (1 if value else 0) << (field.number - 1)
if status.obstruction_stats.avg_prolonged_obstruction_valid:
obstruction_duration = status.obstruction_stats.avg_prolonged_obstruction_duration_s
obstruction_interval = status.obstruction_stats.avg_prolonged_obstruction_interval_s
else:
obstruction_duration = None
obstruction_interval = None
return {
"id": status.device_info.id,