Giter Site home page Giter Site logo

therealwaldo / ha-optimal-humidity Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 1.0 313 KB

Home Assistant Utility Sensor to assist with maintaining the optimal humidity in your home!

License: MIT License

Python 99.17% JavaScript 0.46% Shell 0.37%
hacs home-assistant homeassistant homeassistant-custom-component homeassistant-integration homeassistant-sensor

ha-optimal-humidity's People

Contributors

dependabot[bot] avatar therealwaldo avatar trw-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mpkogli

ha-optimal-humidity's Issues

Set up list of sensors to find critical temp + humidity

With a list of sensors that groups themselves by room and by location in that room, ha-optimal-humidity could identify the critical temperature/humidity/pressure/mold risk automatically.

# Example configuration.yaml entry

sensor:
  - platform: optimal_humidity
    rooms:
      - test_optimal_humidity:
           name: "Optimal Humidity"
           type: optimal_humidity
           sensors:
              - corner:
                - sensor.indoor_temp
                - sensor.indoor_humidity
                - sensor.indoor_pressure
              - window: 
                - sensor.critical_temp

Update import of hass temperature utilities

Version of the custom_component

Latest, v2.0.6

Configuration

- platform: optimal_humidity
  sensors:
    test_optimal_humidity:
      name: "Optimal Humidity"
      type: optimal_humidity
      indoor_temp_sensor: sensor.inkbird_temperature
      indoor_humidity_sensor: sensor.inkbird_humidity
      critical_temp_sensor: sensor.ibs_th_0888_temperature

Describe the bug

In the latest release, I'm getting the below error message in the logs. Looks like HASS moved the temperature conversion functions to a different module. PR created: #214

Debug log


2023-10-11 13:10:20.199 ERROR (MainThread) [homeassistant.helpers.event] Error while dispatching event for sensor.inkbird_temperature to <Job track state_changed event ['sensor.inkbird_humidity', 'sensor.inkbird_temperature', 'sensor.ibs_th_0888_temperature'] HassJobType.Callback <function OptimalHumidity.async_added_to_hass.<locals>.critical_humidity_sensors_state_listener at 0x15441fd362a0>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 293, in _async_dispatch_entity_id_event
hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 636, in async_run_hass_job
hassjob.target(*args)
File "/config/custom_components/optimal_humidity/sensor.py", line 218, in critical_humidity_sensors_state_listener
if self._update_sensor(entity, old_state, new_state):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/optimal_humidity/sensor.py", line 283, in _update_sensor
self._indoor_temp = OptimalHumidity._update_temp_sensor(new_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/optimal_humidity/sensor.py", line 319, in _update_temp_sensor
return util.temperature.fahrenheit_to_celsius(temp)
^^^^^^^^^^^^^^^^
AttributeError: module 'homeassistant.util' has no attribute 'temperature'

Fatal error in logs

Version of the custom_component

1.3.9

Configuration

Any

Describe the bug

Fatal error in logs

Debug log


This error originated from a custom integration.

Logger: homeassistant.helpers.entity
Source: custom_components/optimal_humidity/sensor.py:597
Integration: optimal_humidity (documentation, issues)
First occurred: 4:40:59 PM (28 occurrences)
Last logged: 6:49:28 PM

Update for sensor.bathroom_optimal_humidity fails
Update for sensor.living_room_optimal_humidity fails
Update for sensor.kitchen_optimal_humidity fails
Update for sensor.basement_optimal_humidity fails
Update for sensor.master_bedroom_optimal_humidity fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 401, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 609, in async_device_update
    raise exc
  File "/config/custom_components/optimal_humidity/sensor.py", line 408, in async_update
    self._calc_optimal_humidex()
  File "/config/custom_components/optimal_humidity/sensor.py", line 597, in _calc_optimal_humidex
    optimal_humidex = self._humidex(self._indoor_temp, self._optimal_humidity / 100)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'


attributes are not available on home assistant startup

Logger: homeassistant.helpers.script
Source: helpers/script.py:650
First occurred: 9:26:58 PM (4 occurrences)
Last logged: 9:26:59 PM

Error in 'choose[0]' evaluation: In 'state': In 'state' condition: attribute 'mold_warning' (of entity sensor.master_bathroom_optimal_humidity) does not exist
Error in 'choose[0]' evaluation: In 'state': In 'state' condition: attribute 'mold_warning' (of entity sensor.bathroom_optimal_humidity) does not exist

Depracted constants

HASS log:
TEMP_FAHRENHEIT was used from optimal_humidity, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.FAHRENHEIT instead.

Sensor shows no data

Version of the custom_component

2.0.3

Configuration

sensor:
  - platform: optimal_humidity
    sensors:
      test_optimal_humidity:
        name: "Optimale Luftfeuchtigkeit"
        type: optimal_humidity
        indoor_temp_sensor: sensor.lumi_lumi_weather_4ee65b04_temperature
        indoor_humidity_sensor: sensor.lumi_lumi_weather_4ee65b04_humidity
        critical_temp_sensor: sensor.lumi_lumi_weather_4ee65b04_temperature
        indoor_pressure_sensor: sensor.lumi_lumi_weather_4ee65b04_pressure

Describe the bug

After placing the sensor into the configuration.yaml file and restarting, it still does not show any data.
The Temperature/humindity sensors have data.

Debug log

I did not get Logs to work :(

image

Tempsensor:
image
image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.