question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Color/temp control not working on latest update

See original GitHub issue

Version of the custom_component

Latest

Configuration

N/A

Describe the bug

Brightness still works, no color or temp control though

Debug log


Logger: homeassistant.components.websocket_api.http.connection
Source: components/light/__init__.py:485
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:33:13 AM (11 occurrences)
Last logged: 12:01:59 PM

[139913444255728] type NoneType doesn't define __round__ method
[139913468791728] type NoneType doesn't define __round__ method
[139913453106128] type NoneType doesn't define __round__ method
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 141, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 642, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 681, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 679, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 235, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/config/custom_components/tapo/light.py", line 75, in async_turn_on
    await self._tapo_coordinator.async_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 200, in async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 260, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 321, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 485, in state_attributes
    data[ATTR_HS_COLOR] = (round(hs_color[0], 3), round(hs_color[1], 3))
TypeError: type NoneType doesn't define __round__ method

Logger: homeassistant.components.light
Source: components/light/__init__.py:485
Integration: Light (documentation, issues)
First occurred: 11:32:05 AM (2 occurrences)
Last logged: 11:32:05 AM

Error adding entities for domain light with platform tapo
Error while setting up tapo platform for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 317, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 509, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 530, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 321, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 485, in state_attributes
    data[ATTR_HS_COLOR] = (round(hs_color[0], 3), round(hs_color[1], 3))
TypeError: type NoneType doesn't define __round__ method

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:25 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
petretiandreacommented, Mar 19, 2021

Thank you too. Now I merge the branch into the main branch. You can use it from Hacs 😃

1reaction
braymullocommented, Mar 19, 2021

You’ve cracked it! Well done!

Works perfectly

Read more comments on GitHub >

github_iconTop Results From Across the Web

Temp Color adjust not working on my bulbs. Please help
After being synced they no longer adjust temp color. I have reset them twice but they still arent working. Im not a 100%...
Read more >
Color Temperature - Microsoft Community
Color Temperature · Right click your desktop, choose 'Display Settings' · Click 'Display Adapter Properties', in the resulting dialog, click on ...
Read more >
Re: 19.12.2 "Custom color" setting Bug - AMD Community
This must be a bug, because setting "Custom color" to "on" and turning off "color temperatur control" will equal to "auto" (non-custom color ......
Read more >
Adjust the brightness and color temperature on your iPhone or ...
Learn more · What to do if your display won't turn on or if you have other screen issues. · Use Display Zoom...
Read more >
How to Calibrate LCD Panel Color Temperature in Windows 10
Next, click Previous calibration and Current calibration to see if you like the changes you made. Doing this will not change your calibration....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found