Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component Stopped working, NoneType Data. #3

Closed
HarrisonPace opened this issue Jan 7, 2020 · 2 comments · Fixed by #5
Closed

Component Stopped working, NoneType Data. #3

HarrisonPace opened this issue Jan 7, 2020 · 2 comments · Fixed by #5

Comments

@HarrisonPace
Copy link

Using the Energy Easy component based on the same code base, as of 07/01/2020 the component no longer works:

Error while setting up platform energyeasy Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), 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/energyeasy/sensor.py", line 156, in setup_platform sensors.append(EnergyEasySensor(energyeasy_data, variable, name)) File "/config/custom_components/energyeasy/sensor.py", line 180, in __init__ self._state = round(self.energyeasy_data.data.get(self.type, 0.0), 2) TypeError: type NoneType doesn't define __round__ method

Happy to debug or post any information as needed.

@igorpolsh
Copy link

Had the same error, strangely enough, I found a wrong indent on line 164 in sensor.py (def init(self, energyeasy_data, sensor_type, name):).

The function declaration was indented twice instead of once (under the class).

Have a look if yours is the same, back off one indentation and see if it helps.

Do let me know if it helps, i'm curious if its the same issue as I had.

@JinksKid
Copy link

JinksKid commented May 24, 2021

I have the same issue. I think it has somthing to do with jemena having no data on "today" in the morning as it works fine in the afternoon until midnight.

I just tested it. Was getting an error. Logged onto the Jemena Portal which showed no data for Today. Clicked the 'Get latest data' button then restated HA and it works again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants