Hey there!
I am getting an error while trying to set up my occusim instance.
The error.log gives me:
2018-03-01 23:46:35.082643 WARNING AppDaemon: ------------------------------------------------------------
2018-03-01 23:59:00.082696 WARNING AppDaemon: ------------------------------------------------------------
2018-03-01 23:59:00.082754 WARNING AppDaemon: Unexpected error in worker for App Occupancy Simulator:
2018-03-01 23:59:00.082810 WARNING AppDaemon: Worker Ags: {'name': 'Occupancy Simulator', 'id': UUID('c1c8fe77-bbba-4829-8237-3eab03e990cf'), 'type': 'timer', 'function': <bound method OccuSim.execute_step of <occusim.OccuSim object at 0x7fa13c0f2240>>, 'kwargs': {'random_wohnzimmerabends_off_1': 'scene.occusim_nachts_kuche_off', 'step': 'wohnzimmerabends_off_2', 'constrain_input_boolean': 'input_boolean.occusim_switch,on'}}
2018-03-01 23:59:00.082847 WARNING AppDaemon: ------------------------------------------------------------
2018-03-01 23:59:00.082977 WARNING AppDaemon: Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 501, in worker
funcref(self.sanitize_timer_kwargs(app, args["kwargs"]))
File "/home/smartassi/appdaemon/apps/occusim.py", line 222, in execute_step
self.activate(kwargs[arg], "off")
File "/home/smartassi/appdaemon/apps/occusim.py", line 242, in activate
if not self.test: self.turn_on(entity)
AttributeError: 'OccuSim' object has no attribute 'turn_on'
apps.yaml:
Occupancy Simulator:
module: occusim
class: OccuSim
log: '1'
#notify: '0'
enable: input_boolean.occusim_switch,on
#test: '0'
dump_times: '1'
reset_time: 03:00:00
random_treppenhaus_name: Treppenhaus
random_treppenhaus_start: Day
random_treppenhaus_end: Evening
random_treppenhaus_minduration: '00:01:00'
random_treppenhaus_maxduration: '00:02:00'
random_treppenhaus_number: 50 #Tagsüber 50 mal
random_treppenhaus_on_1: scene.occusim_treppenhaus_og_on
random_treppenhaus_off_1: scene.occusim_treppenhaus_og_off
random_treppenhaus_on_2: scene.occusim_treppenhaus_ug_on
random_treppenhaus_off_2: scene.occusim_oreppenhaus_ug_off
random_treppenhaus_on_3: scene.occusim_treppenhaus_eg_on
random_treppenhaus_off_3: scene.occusim_treppenhause_g_off
random_kuchenachts_name: KucheNachts
random_kuchenachts_start: Bedtime
random_kuchenachts_end: Day
random_kuchenachts_minduration: '00:01:00'
random_kuchenachts_maxduration: '00:10:00'
random_kuchenachts_number: 2
random_kuchenachts_on_1: scene.occusim_nachts_kuche_on
random_kuchenachts_off_1: scene.occusim_nachts_kuche_off
random_wohnzimmerabends_name: wohnzimmerabends
random_wohnzimmerabends_start: Evening
random_wohnzimmerabends_end: BeforeBedtime
random_wohnzimmerabends_minduration: '00:10:00'
random_wohnzimmerabends_maxduration: '03:00:00'
random_wohnzimmerabends_number: 3
random_wohnzimmerabends_on_1: scene.occusim_nachts_kuche_on
random_wohnzimmerabends_off_1: scene.occusim_nachts_kuche_off
step_beforebedtime_start: '23:59:0'
step_beforebedtime_name: BeforeBedtime
step_night_name: Night
step_night_start: 'sunset - 00:10:00'
#step_night_end: 'sunrise - 00:10:00'
step_daytime_name: Day
step_daytime_start: 'sunrise - 00:45:00'
# step_daytime_end: 'sunset - 00:45:00'
step_evening_start: '17:30:00'
step_evening_end: '23:29:59'
step_evening_name: Evening
step_bedtime_start: '00:00:01'
step_bedtime_name: Bedtime
step_bedtime_end: '00:05:30'
appdaemon.yaml:
secrets: /home/smartassi/.homeassistant/secrets.yaml
log:
accessfile: /home/smartassi/appdaemon/logs/access.log
errorfile: /home/smartassi/appdaemon/logs/error.log
logfile: /home/smartassi/appdaemon/logs/appdaemon.log
log_generations: 1
log_size: 1000000
appdaemon:
threads: 10
plugins:
HASS:
type: hass
ha_url: https://xyz.homeassistant.org
ha_key: !secret http_password
cert_verify: True
app_dir: /home/smartassi/appdaemon/
Can someone spot my mistake?
I am craving for help here
Thank you very much in advance!
Walter