tache / homeassistant-kidde

A custom component for Kidde HomeSafe.
MIT License
30 stars 3 forks source link

Air pressure wrong decimals points for units inHg #22

Open jbarbash opened 3 months ago

jbarbash commented 3 months ago

System Health details

System Information

version core-2024.7.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.31-haos-raspi
arch aarch64
timezone America/New_York
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4949 Installed Version | 1.34.0 Stage | running Available Repositories | 1385 Downloaded Repositories | 8
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.4 -- | -- update_channel | stable supervisor_version | supervisor-2024.06.2 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 116.7 GB disk_used | 10.7 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Samba share (12.3.2), Duck DNS (1.18.0), Studio Code Server (5.15.0), Advanced SSH & Web Terminal (18.0.0), InfluxDB (5.0.0), Home Assistant Google Drive Backup (0.112.1), Whisper (2.1.2), AdGuard Home (5.1.1), Matter Server (6.3.1), Mosquitto broker (6.4.1), Tailscale (0.21.0)
Dashboards dashboards | 3 -- | -- resources | 0 views | 2 mode | storage
Recorder oldest_recorder_run | July 30, 2024 at 8:54 PM -- | -- current_recorder_run | August 3, 2024 at 10:36 AM estimated_db_size | 103.77 MiB database_engine | sqlite database_version | 3.45.3

Checklist

Describe the issue

The decimal point is in the wrong spot. Should be 30.00 inHg but reads 3000 in Hg

Reproduction steps

1.when viewing value it shows wrong decimal point location 2. 3. ...

Debug logs

2024-08-03 10:36:06.085 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration linktap which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-03 10:36:06.087 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration rpi_gpio which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-03 10:36:06.088 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration traeger which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-03 10:36:06.090 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration kidde which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-03 10:36:06.091 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration aarlo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-03 10:36:06.093 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-08-03 10:36:11.301 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/themes", "/config/themes", True)])`; This function will be removed in 2025.7 at custom_components/hacs/base.py, line 1182: self.hass.http.register_static_path(f"{URL_BASE}/themes", self.hass.config.path("themes")), please create a bug report at https://github.com/hacs/integration/issues
2024-08-03 10:36:11.310 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/frontend", "/config/custom_components/hacs/hacs_frontend", False)])`; This function will be removed in 2025.7 at custom_components/hacs/frontend.py, line 54: hass.http.register_static_path(f"{URL_BASE}/frontend", locate_dir(), cache_headers=False), please create a bug report at https://github.com/hacs/integration/issues
2024-08-03 10:36:11.319 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/iconset.js", "/config/custom_components/hacs/iconset.js", True)])`; This function will be removed in 2025.7 at custom_components/hacs/frontend.py, line 57: hass.http.register_static_path(, please create a bug report at https://github.com/hacs/integration/issues
2024-08-03 10:36:11.327 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at https://github.com/hacs/integration/issues
2024-08-03 10:36:18.487 DEBUG (MainThread) [custom_components.kidde.coordinator] Finished fetching kidde data in 0.344 seconds (success: True)
2024-08-03 10:36:19.437 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'traeger' calls async_forward_entry_setup for integration, traeger with title: jib2000@gmail.com and entry_id: b126adef385ebff0784a60ac42cd1c1b, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/traeger/__init__.py, line 48: hass.async_create_task(, please create a bug report at https://github.com/njobrien1006/hass_traeger/issues
2024-08-03 10:36:24.559 DEBUG (MainThread) [custom_components.kidde.sensor] last_seen of type <class 'str'> is 2024-08-03T14:26:21.793545475Z
2024-08-03 10:36:24.564 DEBUG (MainThread) [custom_components.kidde.sensor] last_test_time of type <class 'str'> is 2024-03-23T21:32:25Z
2024-08-03 10:36:24.566 DEBUG (MainThread) [custom_components.kidde.sensor] smoke_level of type <class 'int'> is 0
2024-08-03 10:36:24.569 DEBUG (MainThread) [custom_components.kidde.sensor] co_level of type <class 'int'> is 1
2024-08-03 10:36:24.569 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.co_level (<class 'custom_components.kidde.sensor.KiddeSensorEntity'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('carbon_monoxide') it is using; expected one of ['ppm']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/tache/homeassistant-kidde/issues
2024-08-03 10:36:24.571 DEBUG (MainThread) [custom_components.kidde.sensor] battery_state of type <class 'str'> is ok
2024-08-03 10:36:24.571 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.battery_state (<class 'custom_components.kidde.sensor.KiddeSensorEntity'>) is using state class 'measurement' which is impossible considering device class ('enum') it is using; expected None; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/tache/homeassistant-kidde/issues
2024-08-03 10:36:24.572 DEBUG (MainThread) [custom_components.kidde.sensor] life of type <class 'int'> is 516
2024-08-03 10:36:24.572 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity None for domain sensor with platform kidde
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 598, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 717, in _async_add_entity
    entity.add_to_platform_start(
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 244, in add_to_platform_start
    self._sensor_option_unit_of_measurement = self._get_initial_suggested_unit()
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 399, in _get_initial_suggested_unit
    self.device_class, self.native_unit_of_measurement
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/kidde/sensor.py", line 206, in native_unit_of_measurement
    match self.kidde_device.get(self.entity_description.key).get("Unit").upper():
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'
2024-08-03 10:36:24.703 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration traeger with title: jib2000@gmail.com and entry_id: b126adef385ebff0784a60ac42cd1c1b, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. 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 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-03 10:36:24.714 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration traeger with title: jib2000@gmail.com and entry_id: b126adef385ebff0784a60ac42cd1c1b, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. 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 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-03 10:36:24.721 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration traeger with title: jib2000@gmail.com and entry_id: b126adef385ebff0784a60ac42cd1c1b, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. 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 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-03 10:36:24.727 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration traeger with title: jib2000@gmail.com and entry_id: b126adef385ebff0784a60ac42cd1c1b, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. 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 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-03 10:36:24.735 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration traeger with title: jib2000@gmail.com and entry_id: b126adef385ebff0784a60ac42cd1c1b, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. 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 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-03 10:36:32.182 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.helpers.event. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from event directly at custom_components/hacs/base.py, line 630: self.hass.helpers.event.async_track_time_interval(, please create a bug report at https://github.com/hacs/integration/issues
2024-08-03 10:36:54.562 DEBUG (MainThread) [custom_components.kidde.coordinator] Finished fetching kidde data in 0.183 seconds (success: True)
2024-08-03 10:36:54.563 DEBUG (MainThread) [custom_components.kidde.sensor] last_seen of type <class 'str'> is 2024-08-03T14:36:22.407722048Z
2024-08-03 10:36:54.564 DEBUG (MainThread) [custom_components.kidde.sensor] last_test_time of type <class 'str'> is 2024-03-23T21:32:25Z
2024-08-03 10:36:54.564 DEBUG (MainThread) [custom_components.kidde.sensor] smoke_level of type <class 'int'> is 0
2024-08-03 10:36:54.565 DEBUG (MainThread) [custom_components.kidde.sensor] co_level of type <class 'int'> is 1
2024-08-03 10:36:54.565 DEBUG (MainThread) [custom_components.kidde.sensor] battery_state of type <class 'str'> is ok
2024-08-03 10:36:54.565 DEBUG (MainThread) [custom_components.kidde.sensor] life of type <class 'int'> is 516
2024-08-03 10:37:24.538 DEBUG (MainThread) [custom_components.kidde.coordinator] Finished fetching kidde data in 0.159 seconds (success: True)
2024-08-03 10:37:24.539 DEBUG (MainThread) [custom_components.kidde.sensor] last_seen of type <class 'str'> is 2024-08-03T14:36:22.407722048Z
2024-08-03 10:37:24.540 DEBUG (MainThread) [custom_components.kidde.sensor] last_test_time of type <class 'str'> is 2024-03-23T21:32:25Z
2024-08-03 10:37:24.541 DEBUG (MainThread) [custom_components.kidde.sensor] smoke_level of type <class 'int'> is 0
2024-08-03 10:37:24.541 DEBUG (MainThread) [custom_components.kidde.sensor] co_level of type <class 'int'> is 1
2024-08-03 10:37:24.541 DEBUG (MainThread) [custom_components.kidde.sensor] battery_state of type <class 'str'> is ok
2024-08-03 10:37:24.542 DEBUG (MainThread) [custom_components.kidde.sensor] life of type <class 'int'> is 516
2024-08-03 10:37:54.606 DEBUG (MainThread) [custom_components.kidde.coordinator] Finished fetching kidde data in 0.227 seconds (success: True)
2024-08-03 10:37:54.607 DEBUG (MainThread) [custom_components.kidde.sensor] last_seen of type <class 'str'> is 2024-08-03T14:36:22.407722048Z
2024-08-03 10:37:54.608 DEBUG (MainThread) [custom_components.kidde.sensor] last_test_time of type <class 'str'> is 2024-03-23T21:32:25Z
2024-08-03 10:37:54.608 DEBUG (MainThread) [custom_components.kidde.sensor] smoke_level of type <class 'int'> is 0
2024-08-03 10:37:54.609 DEBUG (MainThread) [custom_components.kidde.sensor] co_level of type <class 'int'> is 1
2024-08-03 10:37:54.609 DEBUG (MainThread) [custom_components.kidde.sensor] battery_state of type <class 'str'> is ok
2024-08-03 10:37:54.609 DEBUG (MainThread) [custom_components.kidde.sensor] life of type <class 'int'> is 516
2024-08-03 10:38:24.580 DEBUG (MainThread) [custom_components.kidde.coordinator] Finished fetching kidde data in 0.201 seconds (success: True)
2024-08-03 10:38:24.581 DEBUG (MainThread) [custom_components.kidde.sensor] last_seen of type <class 'str'> is 2024-08-03T14:36:22.407722048Z
2024-08-03 10:38:24.582 DEBUG (MainThread) [custom_components.kidde.sensor] last_test_time of type <class 'str'> is 2024-03-23T21:32:25Z
2024-08-03 10:38:24.582 DEBUG (MainThread) [custom_components.kidde.sensor] smoke_level of type <class 'int'> is 0
2024-08-03 10:38:24.583 DEBUG (MainThread) [custom_components.kidde.sensor] co_level of type <class 'int'> is 1
2024-08-03 10:38:24.583 DEBUG (MainThread) [custom_components.kidde.sensor] battery_state of type <class 'str'> is ok
2024-08-03 10:38:24.583 DEBUG (MainThread) [custom_components.kidde.sensor] life of type <class 'int'> is 516
2024-08-03 10:38:54.572 DEBUG (MainThread) [custom_components.kidde.coordinator] Finished fetching kidde data in 0.193 seconds (success: True)
2024-08-03 10:38:54.574 DEBUG (MainThread) [custom_components.kidde.sensor] last_seen of type <class 'str'> is 2024-08-03T14:36:22.407722048Z
2024-08-03 10:38:54.574 DEBUG (MainThread) [custom_components.kidde.sensor] last_test_time of type <class 'str'> is 2024-03-23T21:32:25Z
2024-08-03 10:38:54.575 DEBUG (MainThread) [custom_components.kidde.sensor] smoke_level of type <class 'int'> is 0
2024-08-03 10:38:54.575 DEBUG (MainThread) [custom_components.kidde.sensor] co_level of type <class 'int'> is 1
2024-08-03 10:38:54.576 DEBUG (MainThread) [custom_components.kidde.sensor] battery_state of type <class 'str'> is ok
2024-08-03 10:38:54.576 DEBUG (MainThread) [custom_components.kidde.sensor] life of type <class 'int'> is 516
2024-08-03 10:39:24.650 DEBUG (MainThread) [custom_components.kidde.coordinator] Finished fetching kidde data in 0.271 seconds (success: True)
2024-08-03 10:39:24.651 DEBUG (MainThread) [custom_components.kidde.sensor] last_seen of type <class 'str'> is 2024-08-03T14:36:22.407722048Z
2024-08-03 10:39:24.652 DEBUG (MainThread) [custom_components.kidde.sensor] last_test_time of type <class 'str'> is 2024-03-23T21:32:25Z
2024-08-03 10:39:24.653 DEBUG (MainThread) [custom_components.kidde.sensor] smoke_level of type <class 'int'> is 0
2024-08-03 10:39:24.653 DEBUG (MainThread) [custom_components.kidde.sensor] co_level of type <class 'int'> is 1
2024-08-03 10:39:24.654 DEBUG (MainThread) [custom_components.kidde.sensor] battery_state of type <class 'str'> is ok
2024-08-03 10:39:24.654 DEBUG (MainThread) [custom_components.kidde.sensor] life of type <class 'int'> is 516
2024-08-03 10:39:54.591 DEBUG (MainThread) [custom_components.kidde.coordinator] Finished fetching kidde data in 0.212 seconds (success: True)
2024-08-03 10:39:54.593 DEBUG (MainThread) [custom_components.kidde.sensor] last_seen of type <class 'str'> is 2024-08-03T14:36:22.407722048Z
2024-08-03 10:39:54.593 DEBUG (MainThread) [custom_components.kidde.sensor] last_test_time of type <class 'str'> is 2024-03-23T21:32:25Z
2024-08-03 10:39:54.594 DEBUG (MainThread) [custom_components.kidde.sensor] smoke_level of type <class 'int'> is 0
2024-08-03 10:39:54.595 DEBUG (MainThread) [custom_components.kidde.sensor] co_level of type <class 'int'> is 1
2024-08-03 10:39:54.595 DEBUG (MainThread) [custom_components.kidde.sensor] battery_state of type <class 'str'> is ok
2024-08-03 10:39:54.595 DEBUG (MainThread) [custom_components.kidde.sensor] life of type <class 'int'> is 516
2024-08-03 10:40:24.578 DEBUG (MainThread) [custom_components.kidde.coordinator] Finished fetching kidde data in 0.199 seconds (success: True)
2024-08-03 10:40:24.579 DEBUG (MainThread) [custom_components.kidde.sensor] last_seen of type <class 'str'> is 2024-08-03T14:36:22.407722048Z
2024-08-03 10:40:24.580 DEBUG (MainThread) [custom_components.kidde.sensor] last_test_time of type <class 'str'> is 2024-03-23T21:32:25Z
2024-08-03 10:40:24.580 DEBUG (MainThread) [custom_components.kidde.sensor] smoke_level of type <class 'int'> is 0
2024-08-03 10:40:24.581 DEBUG (MainThread) [custom_components.kidde.sensor] co_level of type <class 'int'> is 1
2024-08-03 10:40:24.581 DEBUG (MainThread) [custom_components.kidde.sensor] battery_state of type <class 'str'> is ok
2024-08-03 10:40:24.581 DEBUG (MainThread) [custom_components.kidde.sensor] life of type <class 'int'> is 516
2024-08-03 10:40:54.565 DEBUG (MainThread) [custom_components.kidde.coordinator] Finished fetching kidde data in 0.186 seconds (success: True)
2024-08-03 10:40:54.566 DEBUG (MainThread) [custom_components.kidde.sensor] last_seen of type <class 'str'> is 2024-08-03T14:36:22.407722048Z
2024-08-03 10:40:54.567 DEBUG (MainThread) [custom_components.kidde.sensor] last_test_time of type <class 'str'> is 2024-03-23T21:32:25Z
2024-08-03 10:40:54.567 DEBUG (MainThread) [custom_components.kidde.sensor] smoke_level of type <class 'int'> is 0
2024-08-03 10:40:54.568 DEBUG (MainThread) [custom_components.kidde.sensor] co_level of type <class 'int'> is 1
2024-08-03 10:40:54.568 DEBUG (MainThread) [custom_components.kidde.sensor] battery_state of type <class 'str'> is ok
2024-08-03 10:40:54.569 DEBUG (MainThread) [custom_components.kidde.sensor] life of type <class 'int'> is 516

Diagnostics dump

No response

tache commented 3 months ago

Kidde's API denotes that the pressure is stated as hectopascals (hPa). The internal Home Assistant conversion displays it in the units you wish and applies the conversion; in your case, you choose "inches of mercury" (inHg).

However, Kidde seems to be reporting it back as Pascals (Pa), not hPa, so we have the incorrect digits.

It is resporte with ...

inHg = Pressure in hPa from API ÷ 33.86

but needs to be ...

inHg = Pressure as Pa ÷ 3386

With the actual API call listed below, we have Pressure in inHg = 100697 Pa ÷ 3386 ≈ 29.74 inHg

Actual API results ...

Note Kidde does not use the air pressure in the user App. I think that the status is just a placeholder, as I cannot find any online health rating scale for air pressure. In this instance, the other entities iaq, humidity, tvoc are all reporting "Good"

        "hpa": {
            "value": 100697,
            "status": "Unhealthy",
            "Unit": "hpa"
        },
jbarbash commented 3 months ago

I actually think it's reporting in inHg *1000. Right now it's showing 2968 inHg but my weather app reports it as 29.83 inHg. I suppose you may be right about the conversation but not sure how to check in the API. Is there a resolution or just ignore it?

On Sat, Aug 3, 2024, 2:46 PM CJG @.***> wrote:

Kidde's API denotes that the pressure is stated as hectopascals (hPa). The internal Home Assistant conversion displays it in the units you wish and applies the conversion; in your case, you choose "inches of mercury" (inHg).

However, Kidde seems to be reporting it back as Pascals (Pa), not hPa, so we have the incorrect digits.

It is resporte with ...

inHg = Pressure in hPa from API ÷ 33.86

but needs to be ...

inHg = Pressure as Pa ÷ 3386

With the actual API call listed below, we have Pressure in inHg = 100697 Pa ÷ 3386 ≈ 29.74 inHg

Actual API results ...

Note Kidde does not use the air pressure in the user App. I think that the status is just a placeholder, as I cannot find any online health rating scale for air pressure. In this instance, the other entities iaq, humidity, tvoc are all reporting "Good"

    "hpa": {
        "value": 100697,
        "status": "Unhealthy",
        "Unit": "hpa"
    },

— Reply to this email directly, view it on GitHub https://github.com/tache/homeassistant-kidde/issues/22#issuecomment-2267099190, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMOVWPTBF337AYPRCJ2MBLZPUQR5AVCNFSM6AAAAABL57AXTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRXGA4TSMJZGA . You are receiving this because you authored the thread.Message ID: @.***>

tache commented 3 months ago

What is the raw value? In HA, select the number, click the gear, and change unit of measurement to hPa

tache commented 3 months ago

Using the API is on the wiki, but doing the above comment will give you the raw value.

jbarbash commented 3 months ago

100,512 hPa

On Sat, Aug 3, 2024, 3:04 PM CJG @.***> wrote:

What is the raw value? In HA, select the number, click the gear, and change unit of measurement to hPa

— Reply to this email directly, view it on GitHub https://github.com/tache/homeassistant-kidde/issues/22#issuecomment-2267103133, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMOVWI5M5X3KGUHZ7JWQOTZPUSUPAVCNFSM6AAAAABL57AXTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRXGEYDGMJTGM . You are receiving this because you authored the thread.Message ID: @.***>

tache commented 3 months ago

The resolution will be to figure out what unit HPA is reporting, and then we may add another entity with the conversion or just modify the current entity to be HPA.

tache commented 3 months ago

To see what the units were, I setup another pressure sensor, a Bosch BME280 connected via an ESP32. It matches the pressure reading from the KIDDE. I also included a bunch of weather sites to check as well.

kidde-pressure-3

One short term fix is to create a helper to do the adjustment. Steps:

kidde-pressure-1

kidde-pressure-2

tache commented 2 months ago

Updated template sensor to remove warning ...

{{ states('sensor.upstairs_hallway_air_pressure','fixed_pressure')| float(0)/100 }}