- 🔭 I’m currently working on Luizalabs
- 🌱 I’m currently learning Fastapi
- 👯 I’m looking to collaborate on automation projects as or Home Assistant
npub12g6y7jvexxt4pnzgtzgcpja2qxlj33gm7kvk7wc4x2y0c2pxqc3qkfgs7k
A custom component for home assistant
License: MIT License
npub12g6y7jvexxt4pnzgtzgcpja2qxlj33gm7kvk7wc4x2y0c2pxqc3qkfgs7k
When I add an Epic location to HA I get "TypeError: 'NoneType' object is not subscriptable". I have tried multiple locations (US, UK, DE) but always the same error message in the logs... Any idea what to try?
After configuring the extension no sensor appears, it remains empty
Hi,
depending on the games, it might happen that no metacritic entry is available or that they simply cannot be found. If that happens the sensor cant be updated or setup at all if this happens after adding the integration.
I suggest to implement a fallback if the metacritic cannot be found. Unfortunatly, I rarely coded in Python at all. But I think it would be sufficient to wrap these lines with a try-catch (like the one for failed parsing).
search_url = f"https://www.metacritic.com/search/game/{game_name}/results?plats[3]=1&search_type=advanced"
response = requests.get(search_url, headers=self.headers)
response.raise_for_status()
The URL that currently cannot be found: https://www.metacritic.com/search/game/Tandem:%20A%20Tale%20of%20Shadows/results/?plats%5B3%5D=1&search_type=advanced
best regards,
SpiGAndromeda
Expected behavior: Games list updates on poll
Actual behavior: No games are listed, error in log
Log contents:
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:682
integration: Sensor (documentation, issues)
First occurred: 10:49:42 AM (1 occurrences)
Last logged: 10:49:42 AM
epic_games: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 682, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1264, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/epic_games/sensor.py", line 185, in update
runtime=game["viewableDate"].split("T")[0],
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.