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

Unexpected error in worker for App #117

Closed Stromber03 closed 1 year ago

Stromber03 commented 1 year ago

😩 Describe the issue/bug Hi, for all my room I have 4 warning, and nothink works. The light does not turn on when a motion is detected.

πŸ˜’ Expected behavior I would like to run this script. I never succes to make it work

πŸŽ›οΈ Configuration

  module: automoli
  class: AutoMoLi
  room: escalier
  debug_log: true

  # DΓ©lai avant extinction automatique
  delay: 60
  motion_state_on: "on"
  motion_state_off: "off"

  # You can specify a light group or list of lights here
  lights:
    - light.escalier_haut
    - light.escalier_bas

  # You can specify a list of motion sensors here
  motion:
    - binary_sensor.mouvement_escalier_haut
    - binary_sensor.mouvement_cuisine_d_ete

🧠 System

System Information

version core-2023.4.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.10
os_name Linux
os_version 5.15.90
arch x86_64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.32.1 Stage | running Available Repositories | 1340 Downloaded Repositories | 66
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 28 septembre 2023 Γ  02:00 relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | false remote_server | eu-central-1-2.ui.nabu.casa can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 9.5 -- | -- update_channel | stable supervisor_version | supervisor-2023.04.0 agent_version | 1.4.1 docker_version | 20.10.22 disk_total | 219.4 GB disk_used | 35.6 GB healthy | true supported | true board | generic-x86-64 supervisor_api | ok version_api | ok installed_addons | Samba share (10.0.0), Home Assistant Google Drive Backup (0.110.3), SSH & Web Terminal (13.1.0), Mosquitto broker (6.2.0), Studio Code Server (5.5.6), TasmoAdmin (0.24.0), ESPHome (2023.3.2), Grafana (8.2.1), InfluxDB (4.6.0), Node-RED (14.1.4), Z-Wave JS UI (1.10.1), AppDaemon (0.12.1), Zigbee2MQTT (1.30.3-1)

πŸ—’οΈ Logs

2023-04-17 11:14:42.124898 WARNING escalier: ------------------------------------------------------------
2023-04-17 11:14:42.125266 WARNING escalier: Unexpected error in worker for App escalier:
2023-04-17 11:14:42.125590 WARNING escalier: Worker Ags: {}
2023-04-17 11:14:42.125873 WARNING escalier: ------------------------------------------------------------
2023-04-17 11:14:42.126420 WARNING escalier: Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 160, in initialize_app
    await init()
  File "/config/appdaemon/apps/ad-automoli/automoli.py", line 402, in initialize
    daytimes = await self.build_daytimes(
  File "/config/appdaemon/apps/ad-automoli/automoli.py", line 1140, in build_daytimes
    await self.run_daily(
  File "/usr/lib/python3.10/site-packages/appdaemon/adapi.py", line 2661, in run_daily
    if event < now:
TypeError: can't compare offset-naive and offset-aware datetimes
2023-04-17 11:14:42.126763 WARNING escalier: ------------------------------------------------------------
2023-04-17 11:14:49.179410 INFO AppDaemon: Reading config

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

legovaer commented 1 year ago

Duplicate of #114

benleb commented 1 year ago

and fixed by @legovaer in https://github.com/benleb/ad-automoli/pull/115 πŸ‘