tenho aqui o log
2018-12-31 19:24:47 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 350, in _async_add_entity
await entity.async_added_to_hass()
File "/config/custom_components/sensor/utility_meter.py", line 191, in async_added_to_hass
self._unit_of_measurement = state.attributes[ATTR_UNIT_OF_MEASUREMENT]
KeyError: 'unit_of_measurement'
2018-12-31 19:24:56 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/spotipy/client.py", line 121, in _internal_call
r.raise_for_status()
File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.spotify.com/v1/me/player/volume?volume_percent=0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 279, in _handle_service_platform_call
await func(entity, data)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/spotify.py", line 220, in set_volume_level
self._player.volume(int(volume * 100))
File "/usr/local/lib/python3.6/site-packages/spotipy/client.py", line 976, in volume
self._put(self._append_device_id("me/player/volume?volume_percent=%s" % volume_percent, device_id))
File "/usr/local/lib/python3.6/site-packages/spotipy/client.py", line 190, in _put
return self._internal_call('PUT', url, payload, kwargs)
File "/usr/local/lib/python3.6/site-packages/spotipy/client.py", line 126, in _internal_call
headers=r.headers)
spotipy.client.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/me/player/volume?volume_percent=0:
Player command failed: No active device found