GithubHelp home page GithubHelp logo

sensor.trakt's Introduction

sensor.trakt

Trakt component to feed Upcoming Media Card with Trakt's upcoming shows for Home Assistant

GitHub Release GitHub Activity custom_updater License

Project Maintenance BuyMeCoffee

Discord Community Forum

Setup Trakt application on Trakt website

  1. Create new app at https://trakt.tv/oauth/applications
  2. Use the following redirect_uri:
    • With HA cloud configured: https://<cloud-remote-url>/auth/external/callback
    • Without HA cloud configured: http://<local-ip>:/auth/external/callback
  3. Save the application and then note down the client_id and client_secret

Installation in Home Assistant:

  1. Install this component by copying custom_components/trakt to your config folder (or install using hacs).
  2. Restart Home Assistant
  3. Add the Integration from the UI and setup your options

Example ui-lovelace.yaml:

type: custom:upcoming-media-card
entity: sensor.upcoming_calendar
title: Upcoming Movies

Due to how custom_components are loaded, it is normal to see a ModuleNotFoundError error on first boot after adding this, to resolve it, restart Home-Assistant.

sensor.trakt's People

Contributors

engrbm87 avatar fredrikbaberg avatar iantrich avatar ludeeus avatar pinkywafer avatar playedin avatar steven-hack avatar tfili avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sensor.trakt's Issues

Trakt upcoming calendar is empty

Version of Home Assistant

Latest (Home Assistant Supervised)

Version of the custom_component

Latest (2.0.0)

Configuration

Sensor Attributes:

data: 
{}

attribution: Data provided by trakt.tv
unit_of_measurement: shows
friendly_name: Trakt Upcoming Calendar
icon: mdi:calendar

Describe the bug

After setup the integration through UI, sensor is created but it’s empty.

Debug log


2020-05-03 09:31:55 WARNING (MainThread) [custom_components.trakt] Trakt upcoming calendar is empty

Got sensor and state (number of shows) but no shows

I get my sensor but it’s quite empty - only the number of shows (state) is correct.

data: [{“title_default”: “$title”, “line1_default”: “$episode”, “line2_default”: “$release”, “line3_default”: “$rating - $runtime”, “line4_default”: “$number - $studio”, “icon”: “mdi:arrow-down-bold”}]
unit_of_measurement: shows
friendly_name: Trakt Upcoming Calendar
icon: mdi:calendar

module trakt has no attribute 'core'

It happens when i send pin code

module 'trakt' has no attribute 'core'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 134, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1226, in async_call
await asyncio.shield(self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1251, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/components/configurator/init.py", line 235, in async_handle_service_call
await self.hass.async_add_job(callback, call.data.get(ATTR_FIELDS, {}))
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/trakt/sensor.py", line 57, in trakt_configuration_callback
continue_setup_platform(hass, config, token, add_devices, discovery_info)
File "/config/custom_components/trakt/sensor.py", line 89, in continue_setup_platform
add_devices([TraktUpcomingCalendarSensor(hass, config, token)], True)
File "/config/custom_components/trakt/sensor.py", line 118, in init
trakt.core.OAUTH_TOKEN = token
AttributeError: module 'trakt' has no attribute 'core'

Wrong redirect URL

Version of Home Assistant

Home Assistant 2022.10.3

Version of the custom_component

2.0.4

Configuration

None. Over gui

Describe the bug

It's easy. I don't use HA Cloud but have public, static IP with domain. So I setup Trakt app with redirect_uri to https://my_domain_censored/auth/external/callback but if I try to add integration to HA it will redirect me to trakt page with error The requested redirect uri is malformed or doesn't match client redirect URI.. So I check request URL and there's wrong redirect_uri parameter. Instead of what I configured in Trakt app, HA sending:

https://api-v2launch.trakt.tv/oauth/authorize?response_type=code&client_id=CENSORED&redirect_uri=https://my.home-assistant.io/redirect/oauth&state=CENSORED

As you can see the redirect_uri param is send as https://my.home-assistant.io/... what is URL to Nabu Casa I guess. I don't find way to force integration to send actual URL.

And yes I tried Nabu Casa cause of Google Assistant, there can be problem, but now I'm logged of the cloud and don't know if HA keep this URL.

Integration setup returns "The requested redirect uri is malformed or doesn't match client redirect URI.'

Homeassisant version: ,108.6

Integration version: 1.1

Configuration

Configuration.yaml:

trakt: include trakt.yaml:

trakt.yaml:

client_id: !secret trakt_id
client_secret: !secret trakt_secret

Describe the bug

When adding the integration the trakt API page returns:

The requested redirect uri is malformed or doesn't match client redirect URI.

https://api-v2launch.trakt.tv/oauth/authorize?response_type=code&client_id=<client_id>&redirect_uri=http://<hassio_internal_ip>:8123/auth/external/callback&state=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmbG93X2lkIjoiNDI1ODQwZTkyY2NiNDVjNThmOTMzYzAwZjI5ZTJiMDAifQ.zu3D4s6NO-XzUK1pdeNz4cANz36rPDUpUfjGYAZaIjo

I do have a base_url defined and am using an nginx proxy to allow remote access to Hassio for the mobile app but it is using the internal IP in the callback.

No prompt seems be generated for Trakt Auth

Attempt to configure HA Upcoming Media Card integration with Trakt fails.

  1. HA server Internal address set to server internal IP (per image 1): http://192.168.42.84:8123
  2. Trakt API Application definition (set using device uri & local address HOWEVER browser URL does NOT include server address in title bar per discussion in ##34) Image 2
  3. Values entered into HA Trakt Upcoming Calendar Integration prompt (codes copy/past from API def above) image 3
  4. HA Trakt Upcoming Calendar Integration aborts without initiating auth to Trakt image 4

API changes?

Sure something simple and stupid here but after beating my head against this for days I need to prevail upon brighter (or at least different eyes).

Thanks for any help!
--Tom

1  HA General - Server address is set

2  Trakt API Application definition (using local address but browser URL does NOT include server address in title bar)

3  HA Trakt Upcoming Calendar Integration - definition (enter cods from API def)

4  Trakt Upcoming Calendar  integration generates error  No attempt to connect to Trakt after entering ID and secret in previous prompt)

System Config:

System Health

version core-2021.4.6
installation_type Home Assistant Container
dev false
hassio false
docker true
virtualenv false
python_version 3.8.7
os_name Linux
os_version 4.14.24-qnap
arch x86_64
timezone America/Los_Angeles
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 4855
Installed Version 1.11.3
Stage running
Available Repositories 776
Installed Repositories 19
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Lovelace
dashboards 1
resources 0
mode auto-gen

ModuleNotFoundError: No module named 'requests_oauthlib'

After installing this component I keep getting this error, even after restarting home assistant like recommended in the readme file.

2019-08-02 14:01:09 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform trakt Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform SLOW_SETUP_MAX_WAIT) File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/trakt/sensor.py", line 79, in setup_platform request_app_setup(hass, config, add_devices, discovery_info) File "/home/homeassistant/.homeassistant/custom_components/trakt/sensor.py", line 46, in request_app_setup from requests_oauthlib import OAuth2Session ModuleNotFoundError: No module named 'requests_oauthlib'

I've tried to manually install the module with pip3 with no success.

OAUTH error about malformed redirect URL on registration

Version of Home Assistant

0.109.3

Version of the custom_component

2.0.0

Configuration

N.a.

Describe the bug

A clear and concise description of what the bug is.

When I try to register this integration with the new UI integration then I get the following OAUTH error on the Trakt website “The requested redirect uri is malformed or doesn't match client redirect URI.”

Debug log

N.a.

Trakt integration cannot be loaded on startup of HA 2021.5.0

Version of Home Assistant

core-2021.5.0
Home Assistant OS

Version of the custom_component

2.0.3

Configuration

Add your logs here.

Describe the bug

Integration does not load anymore during startup of latest Home Assistant version. See error log below.

Debug log

Logger: homeassistant.util.package
Source: util/package.py:96
First occurred: 11:05:54 (1 occurrences)
Last logged: 11:05:54

Unable to install package trakt==2.14.0: Keyring is skipped due to an exception: 'utf-8' codec can't decode byte 0xa1 in position 2: invalid start byte in entry_points.txt file at path: /usr/local/lib/python3.8/site-packages/pandas-1.2.4.dist-info/entry_points.txt ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5azyab3a/trakt/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5azyab3a/trakt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-gju5d3zt cwd: /tmp/pip-install-5azyab3a/trakt/ Complete output (38 lines): Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2851, in get_entry_map ep_map = self._ep_map File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2813, in __getattr__ raise AttributeError(attr) AttributeError: _ep_map During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-5azyab3a/trakt/setup.py", line 18, in <module> setup( File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 152, in setup _install_setup_requires(attrs) File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 142, in _install_setup_requires dist = MinimalDistribution(attrs) File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 134, in __init__ distutils.core.Distribution.__init__(self, filtered) File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 432, in __init__ for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'): File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 641, in <genexpr> for entry in dist.get_entry_map(group).values() File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2853, in get_entry_map ep_map = self._ep_map = EntryPoint.parse_map( File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2534, in parse_map for group, lines in data: File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3190, in split_sections for line in yield_lines(s): File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2394, in yield_lines for ss in strs: File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2765, in _get_metadata for line in self.get_metadata_lines(name): File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1417, in get_metadata_lines return yield_lines(self.get_metadata(name)) File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1409, in get_metadata return value.decode('utf-8') UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 2: invalid start byte in entry_points.txt file at path: /usr/local/lib/python3.8/site-packages/pandas-1.2.4.dist-info/entry_points.txt ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 

Double Entry in frontend (using upcoming-media-card)

Hi,

My trakt sensor shows the same show double. It only occurs with The Walking Dead. When i look in to the entities state it only shows Walking dead once.

Version of Home Assistant 100.3

Version of the custom_component 1.0.2

Configuration

Lovelace:
entity: sensor.trakt_upcoming_calendar
title: Upcoming Movies/Shows
type: 'custom:upcoming-media-card'
max: 7
clock: 24

Yaml:

  • platform: trakt
    id: '1234myidofcourse'
    secret: '1234mysecretofcourse'
    username: me
    days: 30

Only log about trakt:

2019-10-28 16:33:48 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app
2019-10-28 16:33:49 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for attributes which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-10-28 16:33:49 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for trakt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-10-28 16:33:49 INFO (MainThread) [homeassistant.setup] Setting up sensor

Trakt1
Trakt2
Trakt3

Option to add Anticipated Trakt feeds

Now that I have the Trakt integration running, I find that it is only able to mirror my Sonarr Upcoming TV list. I do not have Trakt VIP and thus do not have custom calendar/subscribing options.

Would it be possible to add some of the Official Trakt Lists (especially Anticipated Movies and Anticipated TV) to the media card?

Thanks

Display name is incorrect in Integrations page.

Version of Home Assistant

.108.6

Version of the custom_component

1.1.0

Describe the bug

The Home Assistant Integrations page doesn't display the name of the integration. It only shows ":Configuration.yaml" and the icon where the name would appear in the list.

Changing DEFAULT_DAYS from to "3" in const.py completely crashes Home Assistant UI

Version of Home Assistant

Home Assistant 0.110.0

Version of the custom_component

Newest, just downloaded from here.

Configuration

default_config:

frontend:
  themes: !include_dir_merge_named themes

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
cover: !include covers.yaml
sensor: !include sensors.yaml
binary_sensor: !include binary_sensors.yaml
light: !include lights.yaml

homeassistant:
  customize: !include customize.yaml

lovelace:
  mode: yaml
  resources: !include resources.yaml

homematic:
  interfaces:
    ip:
      host: 192.168.2.100
      port: 2010
      resolvenames: json
      username: Admin
      password: xxx
    wired: 
      host: 192.168.2.100
      port: 2000
      resolvenames: json
      username: Admin
      password: xxx

Add your logs here.

2020-05-24 00:18:09 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-05-24 00:18:09 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for garbage_collection which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.climate] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.setup] Error during setup of component onboarding
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 171, in _async_setup_component
    hass, processed_config
  File "/usr/src/homeassistant/homeassistant/components/onboarding/__init__.py", line 44, in async_setup
    data = await store.async_load()
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 101, in async_load
    return await self._load_task
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.binary_sensor] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
    await self.hass.async_add_executor_job(self.update)
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.binary_sensor] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.binary_sensor] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.binary_sensor] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.climate] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.climate] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
    await self.hass.async_add_executor_job(self.update)
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.components.switch] homematic: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [homeassistant.setup] Error during setup of component mobile_app
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 171, in _async_setup_component
    hass, processed_config
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/__init__.py", line 40, in async_setup
    app_config = await store.async_load()
  File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 101, in async_load
    return await self._load_task
concurrent.futures._base.CancelledError
2020-05-24 00:18:27 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 364, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 356, in main
    exit_code = asyncio.run(setup_and_run_hass(config_dir, args), debug=args.debug)
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 46, in run
    _cancel_all_tasks(loop)
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 62, in _cancel_all_tasks
    tasks.gather(*to_cancel, loop=loop, return_exceptions=True))
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 574, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
    hass, self
  File "/config/custom_components/trakt/__init__.py", line 76, in async_setup_entry
    if not await trakt_data.async_setup():
  File "/config/custom_components/trakt/__init__.py", line 217, in async_setup
    await self.async_update()
  File "/config/custom_components/trakt/__init__.py", line 136, in async_update
    MyShowCalendar, {CONF_DAYS: self.days}
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__
    self._get()
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 472, in inner
    json_data = self._handle_request('get', url)
  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 449, in _handle_request
    raise self.error_map[response.status_code]()
trakt.errors.TraktInternalException: Internal Server Error

Describe the bug

Im trying to change the default days of series to grab from trakt from 30 to 3 in const.py and it completely crushes my Home Assistant UI throwing over 1400 lines of debug at me. Also tried changing the number in front end and it immediately crashes my Home Assistant front end. I can still access it by Samba. As soon as I delete the trakt folder from custom_componentens, my home assistant will start again without errors.

If you need further information, let me know. Im happy to help out here.

What to put in redirect URI

Ive finished setting everything up except i have no idea what im supposed to be putting into the redirect URI section on the trakt site.

The trakt platform for the sensor integration does not support platform setup. Please remove it from your config.

Version of Home Assistant

0.108.9

Version of the custom_component

1.1.0

Configuration

  • platform: trakt
    id: 'REDACTED'
    secret: 'REDACTED'
    username: REDACTED
    days: 10
    name: Trakt James Calendar

and

  • platform: trakt
    id: 'REDACTED'
    secret: 'REDACTED'
    username: REDACTED
    days: 10
    name: Trakt Kathys Calendar

Add your logs here.

The trakt platform for the sensor integration does not support platform setup. Please remove it from your config.

Describe the bug

It seems like the trakt configuration now goes directly into configuration.yaml instead of belonging in sensors. I had 2 seperate calendars i was feeding into home assistant does this mean i can only have 1 now?

Notification

Hello,

Is there any way to setup an automation, to receive a notification on my phone, when a new movie or new episode from a serie that i follow is aired? I really'd love that, but i can't get the automation to work.

Thanks in advance!

Integration not working

Home Assistant Version 0.109.2

trakt - Installed: 1.1.0
Upcoming Media Card - Installed: 0.4.0

Configuration

trakt:
client_id: '<client_id>'
client_secret: '<client_secret>'

Lovelace UI
type: 'custom:upcoming-media-card'
entity: sensor.trakt_upcoming_calendar
title: Upcoming Movies/Shows
clock: 24

Describe the bug

Upcoming Media Card is not working - it's blank with only the tilt showing though there is the debug log below assume this is related to why it may not be working.

Debug log

Logger: homeassistant.helpers.translation
Source: helpers/translation.py:206
First occurred: 1:26:29 AM (2 occurrences)
Last logged: 1:26:30 AM

trakt: the '.translations' directory has been moved, the new name is 'translations', starting with Home Assistant 0.111 your translations will no longer load if you do not move/rename this

Problem with configuration

I have the component installed.
But when I need to configure it by entering a Pin Code it fails.

What should be the redirect URL for Trakt?

Missing State Parameter

I've setup the app with Redirect URL as http://192.168.1.2:8123/auth/external/callback

I've restarted HA but all I'm getting when I authorise the app is a page that says 'Missing state parameter'

When I add the integration, add in the client ID and client secret I get a page that says:

OAUTH ERROR
The requested redirect uri is malformed or doesn't match client redirect URI.

Changes in Hassio 0.88

Hey buddy, something you may want to work into your wiki as changes to 0.88 have constants moved so therefore locations are broken.

Fix for this in config/custom_components make a new dir called "trakt" and move the file "trakt.py" from config/custom_components/sensor/ to newly created folder config/custom_components/trakt/ then rename file from "trakt.py" to "sensor.py"

Done, not an issue but I believe efficiency is key

Dave.

Error: "Unable to find component sensor.trakt"

After adding trakt.py to custom_components/sensor/ and restarting I get "Unable to find component sensor.trakt".
With more detailed logging, I get:

Error loading custom_components.sensor.trakt. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 94, in get_component
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/sensor/trakt.py", line 12, in <module>
    import trakt
ModuleNotFoundError: No module named 'trakt'

This is on a "Virtual server" install of Hass.io, Home Assistant 0.78.3

auth

hi i get this error getting the auth for trakt
2d9750a9-fe59-4273-8143-ff66f6ef0b18 png

Add Version to manifest file

Version of Home Assistant

2021.4.4

Version of the custom_component

2.0.2

Describe the bug

HA now requires integrations have a version key in the manifest.json file.

Debug log


No 'version' key in the manifest file for custom integration 'trakt'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'trakt'

Poster / Fanart Issues.

How can you make is it does not pull posters of shows that were back many years ago (example: Magnum PI (1980) and now Magnum PI (2019)) It keeps pulling the old show poster from TVDB. Can this be fixed or is this an issue with Trakt?

Add Trakt logo

The Trakt logo could be added to the integration, it would look much better.

Captura de tela 2022-03-29 181029

could be this logo that is their official:

traktlogo

I believe you have to ask with a PR like this example here:

home-assistant/brands#3300

Obrigado!

Oauth error (searched closed issues but can't get it working)

Home Assistant 0.110.1
Trakt Installed: 2.0.0

I've looked at closed issued but have tried every solution presented but continue to get Oauth/malformed url errors.

In Trakt application, I have tried individually:
https://XXXXXX.ui.nabu.casa/auth/external/callback
OR
http://192.168.1.40:/auth/external/callback
OR
urn:ietf:wg:oauth:2.0:oob

If I click the Authorize button in the Trakt application for each of those, only the urn 'works' and gives me a pin - but then I never get to the point of being able to add a pin within the HA - Configuration - Integration - Add part after putting in the Client ID and secret

I have also tried a combo of inputting both
urn:ietf:wg:oauth:2.0:oob
https://XXXXXX.ui.nabu.casa/auth/external/callback

But again got the Oauth error page on Trakt

I do not see anything in Developer Tools - Logs to guide me

Thanks and sorry if I'm missing something obvious

HomeAssistant 2021.12 device_state_attributes

Version of Home Assistant

2021.12.0

Version of the custom_component

2.0.3

Describe the bug

HomeAssistant 2021.12 is reporting the following message.

Debug log


Entity sensor.trakt_upcoming_calendar (<class 'custom_components.trakt.sensor.TraktUpcomingCalendarSensor'>) implements device_state_attributes. Please report it to the custom component author.

Config error "Integration trakt not found when trying to verify its sensor platform."

Hi,

I'm getting the error in the Subject title with Hassio 0.92.1. The sensor was working before (Hassio 0.91).

Trakt sensor defined thus:

- platform: trakt
  id: '0c0c477cd1e90d14etc...'
  secret: 'fb28c99db5010eetc...'
  username: myusername
  days: 10
  name: Upcoming Episodes

Upcoming media card installed here:
Screen Shot 2019-04-29 at 19 03 24

Lovelace reference like so:

resources:
  - type: module
    url: /customcards/custom-cards/tracker-card.js?track=true
  - type: js
    url: /customcards/custom-cards/upcoming-media-card.js?track=true

How can I fix it?

Thank you.

[Enhancement] Allow creation of multiple sensors for grouping shows (ie by genre)

Allow the user to create multiple sensors & group shows under a single sensor, for example by genre. This would allow them to potentially group all anime shows into one sensor & all drama shows into another sensor and fire events separately.

Bonus: Possibly allow a single sensor to list all show names under that group/genre and the air dates of their next episodes (only if they fall within the configured day setting in configuration.yaml)

Example:

Configuration:
Under the Upcoming Drama sensor, user configures days to 1 & adds three shows:

  1. "How to Get Away with Murder" (Airs Thursdays)
  2. "Scandel" (Airs Thursdays)
  3. "The Good Doctor" (Airs Mondays)

Scenario:
If it's wednesday night, then the Drama sensor would list "How to Get Away with Murder" & "Scandel" & the date/time of the next episode. Since "The Good Doctor" isn't airing in the next 24 hours it would not be shown on the Upcoming Drama Sensor at that time.

Error retrving information from api.themoviedb.org

Version of Home Assistant

0.115.0 but issue has persisted a few versions

Version of the custom_component

2.0.1

Configuration

Configured via integration

2020-09-18 23:58:22 WARNING (MainThread) [custom_components.trakt] Error retrving information from api.themoviedb.org
2020-09-18 23:58:24 WARNING (MainThread) [custom_components.trakt] Error retrving information from api.themoviedb.org
2020-09-18 23:58:28 WARNING (MainThread) [custom_components.trakt] Error retrving information from api.themoviedb.org
2020-09-18 23:58:30 WARNING (MainThread) [custom_components.trakt] Error retrving information from api.themoviedb.org
2020-09-19 00:00:40 WARNING (MainThread) [custom_components.trakt] Error retrving information from api.themoviedb.org
2020-09-19 00:00:42 WARNING (MainThread) [custom_components.trakt] Error retrving information from api.themoviedb.org

Describe the bug

Upon initial load and refresh I receive the error, nothing unusual going on, have changed DNS servers to troubleshoot but no issues. Removed integration and added again. Waited long enough for external IP to change in case I was blacklisted.

Debug log

Nothing in debug sorry...

2020-09-19 00:10:24 DEBUG (SyncWorker_17) [trakt.core] get: https://api-v2launch.trakt.tv/search/show?query=rooster-teeth-podcast
2020-09-19 00:10:24 DEBUG (SyncWorker_17) [trakt.core] headers: {'Content-Type': 'application/json', 'trakt-api-version': '2', 'trakt-api-key': 'XXXX', 'Authorization': 'Bearer XXXX'}
2020-09-19 00:10:24 DEBUG (SyncWorker_17) [trakt.core] method, url :: get, https://api-v2launch.trakt.tv/search/show?query=rooster-teeth-podcast
2020-09-19 00:10:24 DEBUG (SyncWorker_17) [trakt.core] RESPONSE [get] (https://api-v2launch.trakt.tv/search/show?query=rooster-teeth-podcast): <Response [200]>
2020-09-19 00:10:24 WARNING (MainThread) [custom_components.trakt] Error retrving information from api.themoviedb.org
2020-09-19 00:10:24 DEBUG (SyncWorker_13) [trakt.core] get: https://api-v2launch.trakt.tv/search/show?query=the-100
2020-09-19 00:10:24 DEBUG (SyncWorker_13) [trakt.core] headers: {'Content-Type': 'application/json', 'trakt-api-version': '2', 'trakt-api-key': 'XXXX', 'Authorization': 'Bearer XXXX'}
2020-09-19 00:10:24 DEBUG (SyncWorker_13) [trakt.core] method, url :: get, https://api-v2launch.trakt.tv/search/show?query=the-100
2020-09-19 00:10:24 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: name=custom_components.trakt, message=['Error retrving information from api.themoviedb.org'], level=WARNING, source=['custom_components/trakt/__init__.py', 188], timestamp=1600470624.538565, exception=, count=1, first_occurred=1600470624.538565>
2020-09-19 00:10:24 DEBUG (SyncWorker_13) [trakt.core] RESPONSE [get] (https://api-v2launch.trakt.tv/search/show?query=the-100): <Response [200]>

Trakt integration could not be loaded in HA version 2021.10.0

Version of Home Assistant

2021.10.0

Version of the custom_component

Latest version

Configuration

Add your logs here.

Describe the bug

The Trakt integration failed to start after updating HA to version 2021.10.0

Probably that also caused that the Lovelace Dashboard could not be shown at all because of a known issue in the Upcoming Media Card. Because this did not happen again after I disabled the Trakt integration and removed the upcoming media card before updating to version 2021.10.0 .

Debug log


Add your logs here.

Issue causing fatal error

Fatal issue causing HomeAssistant to close. Can confirm the OAuth tokens are fine

ha - 0.96.2
hacs - 0.12.1
trakt - 1.0.1

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner


    self.run()


  File "/usr/local/lib/python3.7/threading.py", line 870, in run


    self._target(*self._args, **self._kwargs)


  File "/usr/src/app/homeassistant/util/logging.py", line 88, in _process


    self._queue.get(), self.loop).result()


  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 430, in result


    self._condition.wait(timeout)


concurrent.futures._base.CancelledError




Traceback (most recent call last):


  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main


    "__main__", mod_spec)


  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code


    exec(code, run_globals)


  File "/usr/src/app/homeassistant/__main__.py", line 404, in <module>


    sys.exit(main())


  File "/usr/src/app/homeassistant/__main__.py", line 396, in main


    exit_code = asyncio_run(setup_and_run_hass(config_dir, args))


  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run


    return loop.run_until_complete(main)


  File "uvloop/loop.pyx", line 1445, in uvloop.loop.Loop.run_until_complete


  File "uvloop/loop.pyx", line 1438, in uvloop.loop.Loop.run_until_complete


  File "uvloop/loop.pyx", line 1347, in uvloop.loop.Loop.run_forever


  File "uvloop/loop.pyx", line 487, in uvloop.loop.Loop._run


  File "uvloop/loop.pyx", line 404, in uvloop.loop.Loop._on_idle


  File "uvloop/cbhandles.pyx", line 68, in uvloop.loop.Handle._run


  File "/usr/src/app/homeassistant/helpers/entity_component.py", line 221, in _async_setup_platform


    await self._platforms[key].async_setup(platform_config, discovery_info)


  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 90, in async_setup


    await self._async_setup_platform(async_create_setup_task)


  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform


    SLOW_SETUP_MAX_WAIT)


  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for


    return fut.result()


  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run


    result = self.fn(*self.args, **self.kwargs)


  File "/config/custom_components/trakt/sensor.py", line 81, in setup_platform


    continue_setup_platform(hass, config, token, add_devices, discovery_info)


  File "/config/custom_components/trakt/sensor.py", line 89, in continue_setup_platform


    add_devices([TraktUpcomingCalendarSensor(hass, config, token)], True)


  File "/config/custom_components/trakt/sensor.py", line 127, in __init__


    self.update()


  File "/config/custom_components/trakt/sensor.py", line 144, in update


    calendar = MyShowCalendar(days=self._days)


  File "/usr/local/lib/python3.7/site-packages/trakt/calendar.py", line 31, in __init__


    self._get()


  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 455, in inner


    json_data = self._handle_request('get', url)


  File "/usr/local/lib/python3.7/site-packages/trakt/core.py", line 432, in _handle_request


    raise self.error_map[response.status_code]()


trakt.errors.OAuthException: Unauthorized - OAuth must be provided

OAUTH ERROR - The requested redirect uri is malformed or doesn't match client redirect URI.

Version of Home Assistant

0.111.2

Version of the custom_component

2.0.0

Configuration

Describe the bug

I installed the plugin via HACS. Every time I try to add it as an integration via the GUI, it wants to redirect me to Trakt Oauth authentication.
Trakt will always call http://172.20.0.9:8123/auth/external/callback as redirect_uri, no matter what I have specified as redirect_uri within Trakt for my app.
Since the 172.20.0.9 does not exist within my network, this of course leads to an error message and I cannot authenticate myself.
I don't know if this is a problem of the tract HA integration or tract itself.

Debug log

3456435345
65767657nt

When you change the number of "Days to look forward for movies and shows" parameter it crashes the HomeAssistant Front End

Version of Home Assistant

.108.6

Version of the custom_component

2.0.0

Describe the bug

When you change the number of "Days to look forward for movies and shows" parameter it crashes the HomeAssistant Front End

Debug log

2020-05-03 16:07:33 ERROR (Thread-17) [pychromecast.controllers] Exception thrown when calling cast status listener
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pychromecast/socket_client.py", line 1180, in _report_status
    listener.new_cast_status(self.status)
  File "/usr/src/homeassistant/homeassistant/components/cast/helpers.py", line 161, in new_cast_status
    self._cast_device.new_cast_status(cast_status)
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 487, in new_cast_status
    self.schedule_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 430, in schedule_update_ha_state
    self.hass.add_job(self.async_update_ha_state(force_refresh))
  File "/usr/src/homeassistant/homeassistant/core.py", line 285, in add_job
    self.loop.call_soon_threadsafe(self.async_add_job, target, *args)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 736, in call_soon_threadsafe
    self._check_closed()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 479, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
root@hassio:/usr/share/hassio/homeassistant#  

Invalid config... required key not provided @ data [ 'username']

Hello,

Top work on this - just trying it out and have created a new id and secret but get an error that my config is missing a username...

EDIT: whoops, missed off some of the error message - it has two lines...

Invalid config for [sensor.trakt]: required key not provided @ data [ 'secret']. Got None.
Invalid config for [sensor.trakt]: required key not provided @ data [ 'username']. Got None.

my config was copied and pasted from here (i have tried adding the info to secrets as well as directly in the config )...

- platform: trakt
  id: !secret trakt_id
  key: !secret trakt_key
  days: 10

also being very pedantic, but trakt calls them 'Client ID' & 'Client Secret' not 'ID' & 'Key'!

Cheers,
James

Increase the maximum of days to fetch

Is your feature request related to a problem? Please describe.
I want to fetch shows for more than 33 days, or according to the API (https://trakt.docs.apiary.io/#reference/calendars). You can only fetch 33 days in a row.

Describe the solution you'd like
I would like the api to fetch the trakt api (days / 33) times to retrieve the movies for a specific number of days and aggregate the results.

Describe alternatives you've considered
Nothing.

Additional context
Nothing.

Calendar with ALL movie releases

Hello, how can I make a sensor to get a calendar with ALL new movie releases, and not just the ones that I manually add to my calendar on the Trakt website?

Thank you!

Unable to setup integration

Version of Home Assistant

hassio 0.114.4
Frontend version: 20200811.0
HACS 1.5.2

Version of the custom_component

2.0.1

Configuration

nothing setup for trakt due to config_flow

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

wake_on_lan:
mobile_app:

frontend:
  themes: !include_dir_merge_named ./themes

hacs: !include core/hacs.yaml
mqtt: !include core/mqtt.yaml
duckdns: !include core/duckdns.yaml
influxdb: !include core/influxdb.yaml
speedtestdotnet: !include core/speedtest.yaml
homeassistant: !include core/homeassistant.yaml

google:
  client_id: !secret google_client_id
  client_secret: !secret google_client_secret

panel_iframe: !include_dir_named panels/

scene: !include scenes.yaml
script: !include scripts.yaml
automation: !include automations.yaml

group: !include_dir_merge_named groups/
light: !include_dir_merge_list lights/
switch: !include_dir_merge_list switches/
device_tracker: !include_dir_merge_list device_trackers/
sensor: !include_dir_merge_list sensors/

logger:
  default: info
  logs:
    custom_components.hacs: debug
    hacs: debug

Describe the bug

I'm trying to install and setup the integration through HACS or manually, can't find it in the add integration menu in the configurator.

Already tried to completely remove the files, restarted home assistant multiple times. The only log i get is the warning for the integration not being tested, so it seems like it knows it exists.

Debug log


2020-09-02 20:47:05 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for trakt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.

Error while setting up platform trakt

2019-01-18 14:45:13 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform trakt
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/sensor/trakt.py", line 88, in setup_platform
continue_setup_platform(hass, config, token, add_devices, discovery_info)
File "/config/custom_components/sensor/trakt.py", line 96, in continue_setup_platform
add_devices([TraktMyShowCalendarSensor(hass, config, token)], True)
File "/config/custom_components/sensor/trakt.py", line 134, in init
self.update()
File "/config/custom_components/sensor/trakt.py", line 191, in update
'rating': tmdb_json['vote_average'],
KeyError: 'vote_average'

Am at a loss to what is the issue, not showing in lovelace-ui just shows blank page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.