Thermostat with PID controller

That’s great, thanks for clarifying!

I looked at Nest but was put off by the number of outages they’ve had over the last few years… Your new project sounds great!

Hi @fabian.n

I have updated to 0.84.3 and now I have this error

2018-12-18 09:42:51 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.climate.smart_thermostat. Make sure all dependencies are installed Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/", line 92, in get_component module = importlib.import_module(path) File "/usr/local/lib/python3.6/importlib/", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/config/custom_components/climate/", line 28, in <module> from homeassistant.helpers.restore_state import async_get_last_state ImportError: cannot import name 'async_get_last_state' 2018-12-18 09:42:51 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.smart_thermostat 

Do you know if the last version breaks the component?


I’ll test it, haven’t worked with this version in a while now. Are you sure everything is still where it belongs (file order). It look like it can’t find smart_thermostat anymore but it’s defined in your conf. The file probably got deleted or moved.
Can you open a issue on github?

No changes after updating and when I reverse to 0.83.3 everything started to work again.
Issue opened in GitHub

Hi. Any idea of when you can reinsert min_cycle_duration? Is there an old commit that I can use to understand how that should be implemented?

1 Like

Hi Laffez, I’m sry for all the waiting. I hope I can fix it this week. It’s complicated to integrate, so it works fine. You for example don’t want it to turn on for 30min when the PID out is just on 1%.

I was able to add and test it. It should work as intended, also the pwm and min_duration is now really in minutes. Tell me if something doesn’t work, Thanks.

1 Like

How do I go about installing this in hassio? As far as I know I can only ssh into the core.

Would it be possible to do this in appdaemon?

I do not seen the issue in providing it as a component in trunk. It is already a custom component.
Not everybody use hassio or want to start another daemon (appdaemon) while has already has a performant core with many many interesting components

How did you manage to get it to work? :slight_smile:

I followed the instructions but depending on your version of hass you may change the name of the py file to The bad point is I uninstalled it as it didn’t worked as I was expecting because of the behavior of my sensors not reporting at temperature changes but on fixed times (every 15 minutes)

Is there anyone still working on this? I have taken a stab at updating the smart_thermostat to fix the breaking changes that came with 0.96 but I’m not having any luck getting the python tracebacks. The only error in the log is

Setup failed for smart_thermostat: No setup function defined.

My logger is set up as follows:

  default: error
    homeassistant.core: fatal
    homeassistant.components.mqtt: warning
    custom_components.smart_thermostat: debug