Thermal Comfort custom sensor platform

…custom sensor platform that creates: absolute humidity, heat index, dew point and thermal perception sensors using existing temperature and relative humidity sensor devices…

13 Likes

Someone using this sensor?
For me it worked well for several weeks.

Today I made the update from 0.91.3 to 0.94.4 and the sensor stopped working and I get a lot of entity not available messages. Someone seen the same or any idea how I could repair that?

1 Like

Yes I’m using it a while and I’m now running HA 0.95.4 without problems.

There is just one thing in the calculation of the absolute humidity. I opened it as an issue on github yesterday: https://github.com/dolezsa/thermal_comfort/issues/5

This sensor sounds like a perfect sensor to be extended for the climate control and generic thermostat in Home Assistant.

Do you know if there also exist a sensor to calculate:

  • the number of minutes it take to heat the room to a given temperature, based on the outside temperature, with a given heat source?
  • Or how many minutes it take before the room is cooled down to a spesific temeratur, based on the outside temperatur.

I would like to be able to have a sensor that gives me recomendations for the optimal settings in the integration: https://www.home-assistant.io/integrations/climate/

I guess that the sensor I am looking for is something like “Newton’s law of cooling”:

I use “Xiaomi Aqara Smart Air Pressure Temperature Humidity Sensor” to messure the temeraturs in the diffrent rooms as well as outside.

2 Likes

I think this article describe the sensor needed to make a smart thermostat for home assistant.

It would be nice to see a “prediction timer” for when a desired temperature will be achieved for a room, based on the heat source in the room and the set temperatur in the termostat.

Inferring the thermal resistance and effective thermal mass distribution of a wall from in situ measurements to characterise heat transfer at both the interior and exterior surfaces

I use the thermal_comfort sensor, and it works perfectly for me.

I calculate the sensor data in all rooms based on the data from “Aqara Smart Air Pressure Temperature Humidity Environment Sensor” and I must say it is working perfectly:)

This also helps me determine what the floor thermostat should be set to, and when to start a fan cycle to circulate the air.

As an example, I can now see when the laundry is dry in the laundry room, and when I can put on a new wash:

cards:
  - cards:
      - entity: sensor.bad_hybel_komfort_heatindex
        graph: line
        name: Varme index
        type: sensor
      - entity: sensor.bad_hybel_komfort_absolutehumidity
        max: 16
        min: 4
        name: Fukt
        severity:
          green: 7
          red: 9
          yellow: 8
        theme: default
        type: gauge
        unit: ' '
    type: horizontal-stack
type: vertical-stack

I’m getting this error in the log:

Error doing job: Future exception was never retrieved

The component is working fine though, does anyone came across this? Any way to fix it?
See below for full log details
Thanks

Logger: homeassistant
Source: custom_components/thermal_comfort/sensor.py:118
Integration: thermal_comfort (documentation)
First occurred: May 20, 2021, 10:13:53 PM (44 occurrences)
Last logged: May 21, 2021, 11:59:35 AM

Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/thermal_comfort/sensor.py", line 118, in temperature_state_listener
    self._temperature = float(new_state.state)
ValueError: could not convert string to float: 'unavailable'

Hello @Torgrim

Have you gone further in your research on Newton’s law of cooling?

No, not yet. But I have started to get the proper algorithms. Need to look at it again.

A sensor to calculate the Watt effect you get from the sun, can probobly be done with the new solar sensor: Forecast.Solar - Home Assistant

But I don’t like the idea of a cloud based solution.

It would be better if there was a extenstion to the existing sun sensor in home assistant.
All we need is a proper forcast for the Dobson Unit is the number of molecules of ozone Nasa Ozone Watch: Dobson Unit facts

The rest of the math, should be a breeze for the skilled the developer group at the home assistant community :slight_smile:

Then we could get proper UV-index, D-vitamin pridictions, Sun Burn sensor, Solar wat sensor etc…

As a start, it would be extramly usfull to get the average Daily temperature “degree days”.
This is a average air temperature, measured every hour change during a day. The temperature data can be based on the sun sensor to get more accurate data of the day.
Where the average temperature between: Sunrise, Solar noon (at the topp), Sunset, and the last one at Solar lowest + the average of minimum and maximum temperatur during the 24 hour period.

The “base value”, can be diffrent depending on location e.g 18 °C (64 °F). So this shuld be a parameter into the sensor.

Then based on the Derivative of the outside “degree days” sensor compared to a “degree days” value for the room (with out any extra heat/cooling) e.g (at night), it shuld be posible to estimate the “zero degree-day” when the outside temperature will not change the inside temperature.

and “time” it will take to gain or loose 1°C of temperautre diffrence.
Or how much Power defined as energy over time is required.
Watts are defined as 1 Watt = 1 Joule per second (1W = 1 J/s)

Then it would be possible to get a sensor to “learn” and predict the Power (Watt) needed to heat/cool the room to reach a given set temperature to a given set time.

The value to learn is the K-value “shorthand for thermal conductivity” of the room.
“Thermal conductivity, n: the time rate of steady state heat flow through a unit area of a homogeneous material induced by a unit temperature gradient in a direction perpendicular to that unit area.”

Direct sunlight on a wall, will also have a considerable effect on the temperature, but that would be an additional sensor for the equation (I use a Bayesian sensor to predict if there is heat in the fire or from the sun on the wall, to start a heat sirculation fan).

2 Likes

So I can’t seem to find this in hacs, how would I install it, to then afterwards add it to my config file? Or is it built into core now or whatever? Sorry I clicked the link to hacs and it didn’t open home assistant and I can’t find it in integrations or in repositories on hacs.

1 Like

I have the same problem. I have HACS already installed for other purposes. But I can’t get the “thermal_comfort” to work.
Home Assistant 2021.11.5

3 different things I tried:

  1. I go to HACS in my sidebar → Click on Integrations → Blue button on the bottom right “Explore & Download Repositories” → Searching for “thermal” or “comfort” does not show the correct result
  2. I got to Supervisor in my sidebar → Click on “Add-On Store” → Search for “thermal” or “comfort” does not show the correct result
  3. Still at the “Add-on” store → Click on “…” on the top right → “Repositories” → Adding “GitHub - dolezsa/thermal_comfort: Thermal Comfort sensor for HA (absolute humidity, heat index, dew point, thermal perception)” shows error: “Invalid Add-on repository!”

So thats all I know how to add. What am I doing wrong?

Thank you in advance :slight_smile:

So I just copied a link from GitHub and added it but idk which one I specifically added, i think it was clicking on the creators name or something to add his repository but maybe it was the project itself, I forgot.

Then afterwards it was in hacs to be added. Waiting for a backup to complete at the moment.

Hm, okay. I tried to add these links to the “Add-On-Store” (Path 3. in my last Post).

https://github.com/dolezsa/thermal_comfort
https://github.com/dolezsa/
https://github.com/dolezsa/Xiaomi_Hygrothermo 

There comes always the error “Invalid Add-on repository”. :frowning:
(the last one was just for test reasons, to see if only the “thermal_comfort” makes the problem)

Probably I just overseeing something obvious…

No no, in hacs. Open hacs and click the three dots thing in the top right and click add custom repository.

I think… Now I dont remember I was just guessing at stuff.

Maybe I don’t understand what you mean. So some Screenshots.

Path 3 from Post #14

Path 1 from Post #14



And I don’t know what you mean by adding the link in HACS by clicking on the three dots. Do you mean this dots here?

Go to hacs, home assistant community store

Click custom repositories