core: Freebox : KeyError while testing temperature sensors during setup

The problem

While trying to setup Freebox integration it connects to freebox OK (can see HA access in ‘Gestion des acces’ -> ‘Applications’ in Freebox OS interface) but fails to set up the integration. (My freebox is the Delta model).

The problem happens in: https://github.com/home-assistant/core/blob/dev/homeassistant/components/freebox/router.py#L107| and my guess is that freebox reports undef value for some of the sensors ? (in Freebox OS interface I can see that 2 of 4 installed hard drives are not reporting temperatures correctly - maybe these are causing the problem ? … see attached image) freebox-state

What version of Home Assistant Core has the issue?

core-2022.3.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Freebox

Link to integration documentation on our website

https://www.home-assistant.io/integrations/freebox/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-03-05 10:27:38 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry *********.fbxos.fr for freebox
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/freebox/__init__.py", line 60, in async_setup_entry
    await router.update_all()
  File "/usr/src/homeassistant/homeassistant/components/freebox/router.py", line 75, in update_all
    await self.update_sensors()
  File "/usr/src/homeassistant/homeassistant/components/freebox/router.py", line 115, in update_sensors
    self.sensors_temperature[sensor["name"]] = sensor["value"]
KeyError: 'value'

Additional information

Freebox model: Delta, Freebox OS: 4.5.4

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (4 by maintainers)

Most upvoted comments

@jaroslawp : That’s odd, you are having working hardware & firmware, I suppose there are some differences depending on countries. I’ll fix that soon, but not sure it could go on 2022.10.x

Yes: it’s kind of strange since all 4 drives are of same type … anyway - I can confirm that just checking for not null ‘fixes’ the problem

Thanks!