amosyuen / ha-eight-sleep-climate

Climate entity for controlling eight sleep bed
MIT License
10 stars 3 forks source link

No climate entities showing #137

Open RGarrett93 opened 1 month ago

RGarrett93 commented 1 month ago

I'm unable to get your integration to show the climate entities from the Eight Sleep integration maintained by lukas.

Thanks Ryan

amosyuen commented 1 month ago

How did the configuration flow for the eight_sleep_climate integration look? And can you enable debug logging and post any logs from eight_sleep_climate?

RGarrett93 commented 1 month ago

image

image

image

The configuration worked fine and detected the Eight Sleep integration for each side.

2024-07-22 21:45:31.713 INFO (MainThread) [homeassistant.setup] Setting up eight_sleep_climate
2024-07-22 21:45:31.729 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'eight_sleep_climate' calls `async_add_job`, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/eight_sleep_climate/__init__.py, line 24: hass.async_add_job(, please create a bug report at https://github.com/amosyuen/ha-eight-sleep-climate/issues
2024-07-22 21:45:31.735 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration, eight_sleep_climate with title: Ryan's Eight Sleep Side and entry_id: 01J3E32E619WE8JEE7K3N5GZJQ, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2099, in async_forward_entry_setup
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-07-22 21:45:31.752 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_COOL was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.COOLING instead, please report it to the author of the 'eight_sleep_climate' custom integration
2024-07-22 21:45:31.764 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_HEAT was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.HEATING instead, please report it to the author of the 'eight_sleep_climate' custom integration
2024-07-22 21:45:31.775 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_IDLE was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.IDLE instead, please report it to the author of the 'eight_sleep_climate' custom integration
2024-07-22 21:45:31.787 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_OFF was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.OFF instead, please report it to the author of the 'eight_sleep_climate' custom integration
2024-07-22 21:45:31.791 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('custom_components.eight_sleep_climate.climate',) in /usr/src/homeassistant/homeassistant/loader.py, line 1296: return importlib.import_module(f"{self.pkg_path}.{platform_name}") inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2117, in async_forward_entry_setup
    return await self._async_forward_entry_setup(entry, domain, True)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2149, in _async_forward_entry_setup
    await integration.async_get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1100, in async_get_platform
    platforms = await self.async_get_platforms((platform_name,))
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1165, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1090, in _load_platforms
    platform_name: self._load_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1296, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")

2024-07-22 21:45:31.805 WARNING (MainThread) [homeassistant.components.climate.const] CURRENT_HVAC_COOL was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.COOLING instead, please create a bug report at https://github.com/amosyuen/ha-eight-sleep-climate/issues
2024-07-22 21:45:31.817 WARNING (MainThread) [homeassistant.components.climate.const] CURRENT_HVAC_HEAT was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.HEATING instead, please create a bug report at https://github.com/amosyuen/ha-eight-sleep-climate/issues
2024-07-22 21:45:31.829 WARNING (MainThread) [homeassistant.components.climate.const] CURRENT_HVAC_IDLE was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.IDLE instead, please create a bug report at https://github.com/amosyuen/ha-eight-sleep-climate/issues
2024-07-22 21:45:31.840 WARNING (MainThread) [homeassistant.components.climate.const] CURRENT_HVAC_OFF was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.OFF instead, please create a bug report at https://github.com/amosyuen/ha-eight-sleep-climate/issues
2024-07-22 21:45:31.841 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2117, in async_forward_entry_setup
    return await self._async_forward_entry_setup(entry, domain, True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2149, in _async_forward_entry_setup
    await integration.async_get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1100, in async_get_platform
    platforms = await self.async_get_platforms((platform_name,))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1177, in async_get_platforms
    import_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1165, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1090, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1296, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/eight_sleep_climate/climate.py", line 24, in <module>
    from homeassistant.components.climate.const import HVAC_MODE_AWAY
ImportError: cannot import name 'HVAC_MODE_AWAY' from 'homeassistant.components.climate.const' (/usr/src/homeassistant/homeassistant/components/climate/const.py)

I will keep an eye on the logs but for now anything relating to the eight sleep climate is shown above.

dcrousso commented 1 day ago

im also seeing this, but with slightly different errors

2024-09-08 21:47:33.149 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0xffff66e81750>,) inside the event loop by custom integration 'eight_sleep' at custom_components/eight_sleep/pyEight/eight.py, line 190: async with httpx.AsyncClient() as client: (offender: /usr/local/lib/python3.12/site-packages/httpx/_config.py, line 147: context.load_verify_locations(cafile=cafile)), please create a bug report at https://github.com/lukas-clarke/eight_sleep/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 165, in async_setup_component
    result = await _async_setup_component(hass, domain, config)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 461, in _async_setup_component
    await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/setup.py", line 463, in <genexpr>
    create_eager_task(
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task
    return Task(coro, loop=loop, name=name, eager_start=True)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 752, in async_setup_locked
    await self.async_setup(hass, integration=integration)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/eight_sleep/__init__.py", line 116, in async_setup_entry
    success = await eight.start()
  File "/config/custom_components/eight_sleep/pyEight/eight.py", line 242, in start
    await self.token
  File "/config/custom_components/eight_sleep/pyEight/eight.py", line 213, in token
    await self.refresh_token()
  File "/config/custom_components/eight_sleep/pyEight/eight.py", line 221, in refresh_token
    self._token = await self._get_auth()
  File "/config/custom_components/eight_sleep/pyEight/eight.py", line 190, in _get_auth
    async with httpx.AsyncClient() as client:

2024-09-08 21:47:39.193 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/pytz/zoneinfo/Africa/Abidjan', 'rb') inside the event loop by custom integration 'eight_sleep' at custom_components/eight_sleep/pyEight/eight.py, line 179: timezone = pytz.timezone(self.timezone) (offender: /usr/local/lib/python3.12/site-packages/pytz/__init__.py, line 108: return open(filename, 'rb')), please create a bug report at https://github.com/lukas-clarke/eight_sleep/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 752, in async_setup_locked
    await self.async_setup(hass, integration=integration)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/eight_sleep/__init__.py", line 174, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2121, in async_forward_entry_setups
    await self._async_forward_entry_setups_locked(entry, platforms)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2132, in _async_forward_entry_setups_locked
    await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2134, in <genexpr>
    create_eager_task(
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task
    return Task(coro, loop=loop, name=name, eager_start=True)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2214, in _async_forward_entry_setup
    await entry.async_setup(self.hass, integration=integration)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 130, in async_setup_entry
    return await component.async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 194, in async_setup_entry
    return await self._platforms[key].async_setup_entry(config_entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 328, in async_setup_entry
    return await self._async_setup_platform(async_create_setup_awaitable)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 358, in _async_setup_platform
    awaitable = create_eager_task(awaitable, loop=hass.loop)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task
    return Task(coro, loop=loop, name=name, eager_start=True)
  File "/config/custom_components/eight_sleep/sensor.py", line 146, in async_setup_entry
    async_add_entities(all_sensors)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in _async_schedule_add_entities_for_entry
    task = self.config_entry.async_create_task(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1152, in async_create_task
    task = hass.async_create_task_internal(
  File "/usr/src/homeassistant/homeassistant/core.py", line 829, in async_create_task_internal
    task = create_eager_task(target, name=name, loop=self.loop)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task
    return Task(coro, loop=loop, name=name, eager_start=True)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 644, in async_add_entities
    await add_func(coros, entities, timeout)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 595, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 909, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 542, in state
    value = self.native_value
  File "/config/custom_components/eight_sleep/sensor.py", line 316, in native_value
    return getattr(self._user_obj, self._sensor)
  File "/config/custom_components/eight_sleep/pyEight/user.py", line 292, in presence_start
    return self.device.convert_string_to_datetime(timestamp)
  File "/config/custom_components/eight_sleep/pyEight/eight.py", line 179, in convert_string_to_datetime
    timezone = pytz.timezone(self.timezone)

2024-09-08 21:47:44.860 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.foo_s_previous_presence_start (<class 'custom_components.eight_sleep.sensor.EightUserSensor'>) took 5.698 seconds. Please create a bug report at https://github.com/lukas-clarke/eight_sleep/issues
2024-09-08 21:47:44.999 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'eight_sleep_climate' calls `async_add_job`, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/eight_sleep_climate/__init__.py, line 24: hass.async_add_job(, please create a bug report at https://github.com/amosyuen/ha-eight-sleep-climate/issues
2024-09-08 21:47:45.013 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration, eight_sleep_climate with title: Foo's Eight Sleep Side and entry_id: 01J7AE18GHHR4XWBGSMY7HWRDS, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2161, in async_forward_entry_setup
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-09-08 21:47:45.066 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_COOL was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.COOLING instead, please report it to the author of the 'eight_sleep_climate' custom integration
2024-09-08 21:47:45.078 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_HEAT was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.HEATING instead, please report it to the author of the 'eight_sleep_climate' custom integration
2024-09-08 21:47:45.091 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_IDLE was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.IDLE instead, please report it to the author of the 'eight_sleep_climate' custom integration
2024-09-08 21:47:45.109 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_OFF was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.OFF instead, please report it to the author of the 'eight_sleep_climate' custom integration
2024-09-08 21:47:45.121 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_HEAT_COOL was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT_COOL instead, please report it to the author of the 'eight_sleep_climate' custom integration
2024-09-08 21:47:45.134 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_OFF was used from eight_sleep_climate, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.OFF instead, please report it to the author of the 'eight_sleep_climate' custom integration
2024-09-08 21:47:45.140 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.eight_sleep_climate.climate.EightSleepThermostat'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please create a bug report at https://github.com/amosyuen/ha-eight-sleep-climate/issues
2024-09-08 21:47:45.141 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.eight_sleep_climate.climate.EightSleepThermostat'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please create a bug report at https://github.com/amosyuen/ha-eight-sleep-climate/issues
2024-09-08 21:47:45.141 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.eight_sleep_climate.climate.EightSleepThermostat'>) implements HVACMode(s): heat_cool, off and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/amosyuen/ha-eight-sleep-climate/issues
2024-09-08 21:47:45.144 ERROR (MainThread) [homeassistant.components.climate] Error adding entity climate.foo_s_eight_sleep_side for domain climate with platform eight_sleep_climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 595, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 909, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1069, in __async_calculate_state
    if state_attributes := self.state_attributes:
                           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 528, in state_attributes
    hass, self.current_temperature, temperature_unit, precision
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/eight_sleep_climate/climate.py", line 137, in current_temperature
    return int(state.state)
           ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'unknown'
2024-09-08 21:47:50.322 ERROR (Recorder) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1534, in _async_process_registry_update_or_remove
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1069, in __async_calculate_state
    if state_attributes := self.state_attributes:
                           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 528, in state_attributes
    hass, self.current_temperature, temperature_unit, precision
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/eight_sleep_climate/climate.py", line 137, in current_temperature
    return int(state.state)
           ^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'unknown'
amosyuen commented 11 hours ago

Can't do anything about errors in eight_sleep, but a fix for the invalid literal for int() with base 10: 'unknown' error is in https://github.com/amosyuen/ha-eight-sleep-climate/releases/tag/v3.0.1

dcrousso commented 3 hours ago

sweet! thanks for the quick fix! im now able to at least see some temperature readout

unfortunately, it doesnt appear to correspond to the right state in the Eight Sleep app, as the widget in Home Assistant always shows "Off" no matter what the Eight Sleep app says.

also, i think there's maybe some weird math happening to convert the temperature? i have to set it to -58F in Home Assistant for 68F to show up in the Eight Sleep app, and 68F in Home Assistant causes the Eight Sleep app to show 103F.

any idea what might be going on? happy to provide any logs or do any debugging that might help