Closed nodinosaur closed 7 years ago
Updating the sensor.yaml
- platform: google_wifi
#name: 'Google Wifi'
host: XXX.XXX.XXX.XXX
monitored_conditions:
- current_version
- new_version
- uptime
- last_restart
- local_ip
- status
Returns:
2017-07-30 15:51:47 ERROR (Thread-6) [homeassistant.components.sensor.google_wifi] Before request
2017-07-30 15:51:47 ERROR (Thread-6) [homeassistant.components.sensor.google_wifi] {'system': {'hardwareId': 'ARKHAM [redacted]', 'deviceId': '[redacted]', 'lan0Link': True, 'groupRole': 'none', 'countryCode': 'us', 'modelId': 'ACo3V', 'uptime': [redacted]}, 'software': {'updateNewVersion': '0.0.0.0', 'updateStatus': 'idle', 'updateProgress': 0.0, 'updateChannel': 'stable-channel', 'updateRequired': False, 'softwareVersion': '9460.40.5'}, 'wan': {'online': True, 'pppoeDetected': False, 'captivePortal': False, 'ethernetLink': False, 'ipAddress': True}}
2017-07-30 15:51:47 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform google_wifi
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 164, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for
return fut.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/google_wifi.py", line 84, in setup_platform
api = GoogleWifiAPI(host)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/google_wifi.py", line 160, in __init__
self.update()
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 303, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/google_wifi.py", line 172, in update
self.data_format()
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/google_wifi.py", line 201, in data_format
self.data[ATTR_LOCAL_IP] = value['localIpAddress']
KeyError: 'localIpAddress'
Yet component is not shown in States
That's because of the connection error.
However, this is slightly misleading i.e. Should host IP be wrapped in single quotes? Should name be wrapped in single quotes?
That's covered in the docs.
Can you please check if #8731 solves your issue?
@fabaff this issue is a duplicate of #8705 which i fixed with PR #8710 which was merged and set for the 0.50.2 milestone
Closing this as @fronzbot has fixed it.
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (
hass --version
):0.50.1
Python release (
python3 --version
):3.4
Component/platform:
component.sensor.google_wifi
Description of problem: I think the Docs for this component are not clear on how to set up. Docs suggest:
Yet component is not shown in States
When searching further I found the original Pull Request Which shows some further info on how to configure the sensor:
However, this is slightly misleading i.e.
host
IP be wrapped in single quotes?name
be wrapped in single quotes?Traceback (if applicable): Adding
logger
to myconfiguration.yaml
The following logs are printed;