therealwaldo / ha-optimal-humidity Goto Github PK
View Code? Open in Web Editor NEWHome Assistant Utility Sensor to assist with maintaining the optimal humidity in your home!
License: MIT License
Home Assistant Utility Sensor to assist with maintaining the optimal humidity in your home!
License: MIT License
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
Latest, v2.0.6
- 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
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
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'
1.3.9
Any
Fatal error in logs
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'
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
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.
Adding all input values to attributes will assist in visual inspection of current conditions
2.0.3
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
After placing the sensor into the configuration.yaml file and restarting, it still does not show any data.
The Temperature/humindity sensors have data.
I did not get Logs to work :(
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.