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

Room Error after install Update #82

Closed clipse2004 closed 3 years ago

clipse2004 commented 3 years ago

😩 Describe the issue/bug After Installing the Update i got "Room" Error see above, reinstalling 11.0 -> all works 😒 Expected behavior A clear and concise description of what you expected to happen.

🎛️ Configuration

esszimmer:
  module: automoli
  class: AutoMoLi
  room: esszimmer
  disable_switch_entities:
    - input_boolean.automoli_deaktivieren
  disable_switch_states: "off"
  dim:
    method: transition
    seconds_before: 5
  motion_state_on: "on"
  motion_state_off: "off"
  daytimes:
    - { starttime: "sunrise", name: morning, light: 35, delay: 45 }
    - { starttime: "07:30", name: day, light: 100, delay: 60 }
    - { starttime: "sunset-22:30", name: evening, light: 65, delay: 75 }
    - { starttime: "22:30", name: night, light: 50, delay: 45 }

  humidity:
    - sensor.netatmo_home_wetter_station_modul_esszimmer_humidity
  illuminance:
    - sensor.bewegungsmelder_hue_esszimmer_light_level
  illuminance_threshold: 5
  lights:
    - light.stehlampe_hue_signe_esszimmer
  motion:
    - binary_sensor.bewegungsmelder_hue_esszimmer_motion
    - binary_sensor.lumi_lumi_sensor_motion_aq2_ias_zone

🧠 System

🗒️ Logs

2021-07-27 12:03:57.111656 INFO schlafzimmer:  
2021-07-27 12:03:57.112539 WARNING schlafzimmer: ------------------------------------------------------------
2021-07-27 12:03:57.113412 WARNING schlafzimmer: Unexpected error running initialize() for schlafzimmer
2021-07-27 12:03:57.114113 WARNING schlafzimmer: ------------------------------------------------------------
2021-07-27 12:03:57.115598 WARNING schlafzimmer: Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 159, in initialize_app
    await init()
  File "/config/appdaemon/apps/ad-automoli/automoli.py", line 215, in initialize
    self.lg("")
  File "/config/appdaemon/apps/ad-automoli/automoli.py", line 163, in lg
    name=self.room.name.capitalize(),  # type:ignore
AttributeError: 'AutoMoLi' object has no attribute 'room'
2021-07-27 12:03:57.116220 WARNING schlafzimmer: ------------------------------------------------------------

🧁 Additional context Add any other context about the problem here.

benleb commented 3 years ago

Already fixed in master, see https://github.com/benleb/ad-automoli/issues/81

clipse2004 commented 3 years ago

Not for me, now i get this Error

AppDaemon: Initializing app badezimmer using class AutoMoLi from module automoli
2021-07-29 22:24:26.082421 INFO AppDaemon: Initializing app küche using class AutoMoLi from module automoli
2021-07-29 22:24:26.093084 INFO badezimmer:  
2021-07-29 22:24:26.097260 INFO badezimmer:   hey, what about trying Python >= 3.9‽ 🤪
2021-07-29 22:24:26.101273 INFO badezimmer:  
2021-07-29 22:24:26.205062 WARNING badezimmer: ------------------------------------------------------------
2021-07-29 22:24:26.205755 WARNING badezimmer: Unexpected error in worker for App badezimmer:
2021-07-29 22:24:26.206479 WARNING badezimmer: Worker Ags: {}
2021-07-29 22:24:26.207141 WARNING badezimmer: ------------------------------------------------------------
2021-07-29 22:24:26.208108 WARNING badezimmer: Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 159, in initialize_app
    await init()
  File "/config/appdaemon/apps/ad-automoli/automoli.py", line 358, in initialize
    self.room = Room(
TypeError: __init__() got an unexpected keyword argument 'room_lights'
2021-07-29 22:24:26.208692 WARNING badezimmer: ------------------------------------------------------------
2021-07-29 22:24:26.213064 INFO küche:  
2021-07-29 22:24:26.216999 INFO küche:   hey, what about trying Python >= 3.9‽ 🤪
2021-07-29 22:24:26.220936 INFO küche:  
2021-07-29 22:24:26.324631 WARNING küche: ------------------------------------------------------------
2021-07-29 22:24:26.325325 WARNING küche: Unexpected error in worker for App küche:
2021-07-29 22:24:26.326040 WARNING küche: Worker Ags: {}
2021-07-29 22:24:26.326685 WARNING küche: ------------------------------------------------------------
2021-07-29 22:24:26.327851 WARNING küche: Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/appdaemon/app_management.py", line 159, in initialize_app
    await init()
  File "/config/appdaemon/apps/ad-automoli/automoli.py", line 358, in initialize
    self.room = Room(
TypeError: __init__() got an unexpected keyword argument 'room_lights'
2021-07-29 22:24:26.328415 WARNING küche: ------------------------------------------------------------ 
benleb commented 3 years ago

oh sorry! Looks like you are somehow running an old version of adutils, a dependency of AutoMoLi which should be installed automatically like shown in the screen below. (fresh docker container on first start) image

can you check which version of adutils you are running? and if its not adutils-0.6.2, upgrade to it and try again?

and do you have an idea why auto-install does not work in your setup? seems like you also use docker for appdaemon right? do you have some "uncommon" setup or anything which could cause this?

I will try to reproduce this with python3.8 meanwhile....

clipse2004 commented 3 years ago

Holy shit, After installing Python Package „adutils“ in appdaemon -> everything works!! Do you have More Tipps which packages i should install? ;)

Big thanks for your help and this really great App Automoli! :)