benleb / ad-automoli

💡 Fully automatic light management based on conditions like motion, illuminance, humidity, and other clever features
https://github.com/benleb/ad-automoli
MIT License
110 stars 29 forks source link

AttributeError: 'list' object has no attribute 'split' #42

Closed chbndrhnns closed 4 years ago

chbndrhnns commented 4 years ago

I see this error since a couple of weeks now in the AD logs. Out of your mind, has some config option changed in automoli? I am using version 0.7.2

2020-06-28 23:55:51.013582 WARNING bathroom_automoli: Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/appdaemon/threading.py", line 766, in worker
    funcref(self.AD.sched.sanitize_timer_kwargs(app, args["kwargs"]))
  File "/config/appdaemon/apps/ad-automoli/automoli.py", line 324, in lights_off
    f"🛁 no motion in {hl(self.room.capitalize())} since "
  File "/usr/lib/python3.8/site-packages/appdaemon/utils.py", line 191, in inner_sync_wrapper
    f = run_coroutine_threadsafe(self, coro(self, *args, **kwargs))
  File "/usr/lib/python3.8/site-packages/appdaemon/utils.py", line 285, in run_coroutine_threadsafe
    result = future.result(self.AD.internal_function_timeout)
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/usr/lib/python3.8/site-packages/appdaemon/adapi.py", line 1310, in get_state
    return await self.AD.state.get_state(
  File "/usr/lib/python3.8/site-packages/appdaemon/state.py", line 351, in get_state
    domain = entity_id.split(".", 1)[0]
AttributeError: 'list' object has no attribute 'split'
chbndrhnns commented 4 years ago

This is my current configuration:

bathroom_automoli:
  module: automoli
  class: AutoMoLi
  room: Bad
  # disable_switch_entity: input_boolean.automoli
  delay: 100
  daytimes:
    - { starttime: "05:30", name: day, light: 100 }
    - { starttime: "20:30", name: evening, light: 90 }
    - { starttime: "23:30", name: night, light: 40 }
  illuminance: 
    - sensor.motion_bathroom
  illuminance_threshold: 40
  motion_state_on: "on"
  motion_state_off: "off"
  lights:
    - light.bulb_bathroom
  motion:
    - binary_sensor.motion_bathroom
  humidity:
    - sensor.climate_bathroom_2
  humidity_threshold: 65
benleb commented 4 years ago

oh sorry! fixed in v0.7.3