home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.24k stars 29.86k forks source link

Failed to create a HomeKit accessory for ... #45148

Closed rjmcfadd closed 3 years ago

rjmcfadd commented 3 years ago

The problem

When Home Assistant starts I get the following error:

2021-01-14 11:12:09 ERROR (SyncWorker_7) [homeassistant.components.homekit] Failed to create a HomeKit accessory for light.over_cabinet_light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 531, in add_bridge_accessory
    acc = get_accessory(self.hass, self.driver, state, aid, conf)
  File "/usr/src/homeassistant/homeassistant/components/homekit/accessories.py", line 237, in get_accessory
    return TYPES[a_type](hass, driver, name, state.entity_id, aid, config)
  File "/usr/src/homeassistant/homeassistant/components/homekit/type_lights.py", line 106, in __init__
    self.async_update_state(state)
  File "/usr/src/homeassistant/homeassistant/components/homekit/type_lights.py", line 188, in async_update_state
    color_temperature_mired_to_kelvin(
  File "/usr/src/homeassistant/homeassistant/util/color.py", line 510, in color_temperature_mired_to_kelvin
    return math.floor(1000000 / mired_temperature)
TypeError: unsupported operand type(s) for /: 'int' and 'str'`

Environment

## System Health version | 2021.1.1 -- | -- installation_type | Home Assistant Supervised dev | false hassio | true docker | true virtualenv | false python_version | 3.8.7 os_name | Linux os_version | 5.4.0-58-generic arch | x86_64 timezone | America/New_York
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 4042 Installed Version | 1.9.0 Stage | running Available Repositories | 717 Installed Repositories | 51
AccuWeather can_reach_server | ok -- | -- remaining_requests | 39
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Hass.io host_os | Ubuntu 20.04.1 LTS -- | -- update_channel | stable supervisor_version | 2020.12.7 docker_version | 19.03.12 disk_total | 116.4 GB disk_used | 69.9 GB healthy | true supported | failed to load: Unsupported supervisor_api | ok version_api | ok installed_addons | Samba share (9.3.0), File editor (5.2.0), WireGuard (0.4.0), Node-RED (7.2.11), AirCast (2.4.1), Check Home Assistant configuration (3.6.0), Glances (0.9.1), Home Assistant Google Drive Backup (0.103.0), TasmoAdmin (0.13.1), Assistant Relay (0.7.4), MariaDB (2.2.1), Portainer (1.3.0), Visual Studio Code (2.9.1), SSH & Web Terminal (7.8.0), Duck DNS (1.12.4), NGINX Home Assistant SSL proxy (3.0.1), OpenZWave (0.8.0), Mosquitto broker (5.1), rest980 Docker Image (20200205), rest980_2 Docker Image (20200205), php-nginx Docker Image (latest), php-nginx_2 Docker Image (latest)
Lovelace dashboards | 1 -- | -- mode | storage views | 14 resources | 33
- Home Assistant Core release with the issue: - Last working Home Assistant Core release (if known): - Operating environment (OS/Container/Supervised/Core): - Integration causing this issue: - Link to integration documentation on our website: ## Problem-relevant `configuration.yaml`

Traceback/Error logs

Additional information

probot-home-assistant[bot] commented 3 years ago

homekit documentation homekit source (message by IssueLinks)

probot-home-assistant[bot] commented 3 years ago

Hey there @bdraco, mind taking a look at this issue as its been labeled with an integration (homekit) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

bdraco commented 3 years ago

Which integration provides the light. It looks like the color temp is being provided as a string instead of a number.

rjmcfadd commented 3 years ago

Hi @bdraco, that light is from the Tasmota integration.

emontnemery commented 3 years ago

Please enable some additional logging and attach a log showing HA startup, including the error message. You can zip the log, then simply drag it to a github comment to attach it.

logger:
  default: info
  logs:
    homeassistant.core: debug
    homeassistant.components.mqtt: debug
    homeassistant.components.tasmota: debug
    hatasmota: debug
emontnemery commented 3 years ago

@rjmcfadd Do you still have the problem or can the issue be closed?