AppDaemon not reaching HA sensors... and unable to run apps

Hi all,
I installed AppDaemon in a “reserved” virtual env (HA runs in a different virtual env).
It runs and connection to HA is ok, but…
I wrote (copied) an app to use a thermostat “smarter” than generic_thermostat (copied from https://gist.github.com/matt2005/e2c853251808b9a3bc7c98fa25cc59ca). I’ll want to have more powerfull control on heater and temperatures, e.g.: I’d like to stop “away mode” before in cold days…

Running it I got this error (sensor.curr_temperature is my temperature homeassistant sensor)
WARNING AppDaemon: Unexpected error running initialize() for heating_logic
File “/srv/appdaemon/lib/python3.5/site-packages/appdaemon/appdaemon.py”, line 1581, in init_object
init()
File “/home/homeassistant/.homeassistant/others/appdaemon/conf/apps/heatinglogic.py”, line 17, in initialize
self.get_sensor_temperatures()
File “/home/homeassistant/.homeassistant/others/appdaemon/conf/apps/heatinglogic.py”, line 30, in get_sensor_temperatures
self.temperature_outside_actual = float(self.get_state(self.args[‘sensor_temperature_outside_actual’]))
File “/srv/appdaemon/lib/python3.5/site-packages/appdaemon/appapi.py”, line 228, in get_state
return self.AD.get_state(namespace, device, entity, attribute)
File “/srv/appdaemon/lib/python3.5/site-packages/appdaemon/appdaemon.py”, line 701, in get_state
return deepcopy(self.state[namespace])
KeyError: ‘sensor.curr_temperature’

So, I tried to install smart_heat.py (from https://github.com/home-assistant/appdaemon/tree/dev/conf/example_apps) and I configured .yaml file (based on https://github.com/home-assistant/appdaemon/tree/dev/conf/examples.yaml). But I got:
ImportError: No module named ‘hassapi’

So I tried to install and use “schedy” (hass-apps: https://hass-apps.readthedocs.io/en/stable/index.html), but I had
WARNING AppDaemon: Unable to find module module hass_apps_loader - schedy is not initialized

I’m a bit confused…

Anyone can help me?
Thanks in advance

the first one is created for appdaemon 2.0 so it needs changing
the second 1 is already rewritten on the github for AD 4.0 which hasnt been released yet
the third 1 has a complete install guide and if you have trouble installing it i advice you to post questions in the schedy topic here on the forum.

thank you very much :+1: