Thermal Comfort custom sensor platform

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

Add his name or whatever on git hub, or specifically the url of him.

Now I get it! I just didn’t see the “Custom repositories”. Everything works wonderfully now! Thank you very much for your help! Now I can air my rooms properly :slight_smile:

For the records (if someone has the same problem) here the screenshot:

Thank you Thomas_Margotta for your help and thank you Anton Dolezsa for this great tool!

Lol right this thing is badass, I’m just trying to figure out how to use all this data to find what the relative humidity of the outside is at the temperature of inside. Like to convert it somehow. I’m not 100% on how to do that. Basically trying to figure out if it should turn on the auto humidifier automation or the auto dehumidifier automation, now it sometimes pinpongs between dehumidifying or humidifying because it becomes too humid then too arid then too humid, just repeatedly. Wasting a bunch of electricity making noise and being generally counterproductive.

Like If the outside air were to come inside and become a different temperature, what would the relative humidity be for the air. I’m still stuck on that because I’m not sure what I’m doing.

1 Like

Do you know what mathematical formula I can use, maybe in templates, to take the values and make that kinda conversion and stick it into a variable or a sensor?

What do you want to achieve? If you want to control a humidifier/dehumidifier you just need the rel humidity in your room you want to control. You should add some hysterisis to the control otherwise it will constantly switch between humidifying and dehumidifying.
If you have a fan, e.g. between outside and basement, you should use the absulute humidity to control the fan, because of the temperature differences,

1 Like