python-sagemcom-api icon indicating copy to clipboard operation
python-sagemcom-api copied to clipboard

Handle missing paths in GetDeviceInfo

Open mr-miles opened this issue 10 months ago • 0 comments

TalkTalk (UK) branded F5364 does not recognise the ModelNumber attribute requested in GetDeviceInfo This causes an exception to be thrown, because GetResponse throws for any ActionError. End result is that HA cant connect to the router to retrieve the useful info, even though the ModelNumber is not essential info.

Fixed by:

  • Lifting behaviour around ActionErrors to higher level, so caller can react appropriately
  • Specifically avoid throwing exceptions on missing path errors when getting DeviceInfo

There was a TODO around how to deal with multiple ActionErrors, which this PR also addresses - since errors can now be thrown at the point of reading the value from the response if required.

For calls other than GetDeviceInfo, the existing behaviour is retained.

mr-miles avatar Feb 01 '25 22:02 mr-miles