home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.29k stars 30.61k forks source link

Calendar trigger broken #120704

Closed AR2000AR closed 4 weeks ago

AR2000AR commented 4 months ago

h### The problem

Calendar automation trigger is returning a error in the log

What version of Home Assistant Core has the issue?

core-2024.6.4

What was the last working version of Home Assistant Core?

core-2024.6.3

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Automation

Link to integration documentation on our website

https://www.home-assistant.io/integrations/calendar/

Diagnostics information

home-assistant_2024-06-27T21-18-00.960Z.log

Example YAML snippet

alias: Reveil
description: ""
trigger:
  - platform: calendar
    event: start
    offset: "-1:0:0"
    entity_id: calendar.work
condition:
  - condition: time
    after: "00:00:00"
    before: "12:00:00"
action:
  - service: light.turn_on
    metadata: {}
    data:
      brightness_pct: 15
    target:
      entity_id: light.ampoule_chambre
mode: single

Anything in the logs that might be useful for us?

Logger: homeassistant.components.automation.reveil
Source: components/calendar/trigger.py:97
integration: Automation (documentation, issues)
First occurred: 01:04:35 (1 occurrences)
Last logged: 01:04:35

Error setting up trigger Reveil
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/calendar/trigger.py", line 273, in async_attach_trigger
    get_entity(hass, entity_id)
  File "/usr/src/homeassistant/homeassistant/components/calendar/trigger.py", line 97, in get_entity
    component: EntityComponent[CalendarEntity] = hass.data[DOMAIN]
                                                 ~~~~~~~~~^^^^^^^^
KeyError: 'calendar'
Logger: py.warnings
Source: components/caldav/__init__.py:5
First occurred: 01:04:34 (3 occurrences)
Last logged: 01:04:34

/usr/local/lib/python3.12/site-packages/vobject/base.py:736: SyntaxWarning: invalid escape sequence '\-' patterns['name'] = '[a-zA-Z0-9\-_]+'
/usr/local/lib/python3.12/site-packages/vobject/base.py:1219: SyntaxWarning: invalid escape sequence '\;' s = s.replace("\\", "\\\\").replace(";", "\;").replace(",", "\,")
/usr/local/lib/python3.12/site-packages/vobject/base.py:1219: SyntaxWarning: invalid escape sequence '\,' s = s.replace("\\", "\\\\").replace(";", "\;").replace(",", "\,")


### Additional information

Currently collecting CalDAV logs. Will send them tomorrow (faulty automation get triggered only once per day).
home-assistant[bot] commented 4 months ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (calendar) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `calendar` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign calendar` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


calendar documentation calendar source (message by IssueLinks)

AR2000AR commented 4 months ago

error_log.txt

AR2000AR commented 4 months ago

Downgraded my instance to 2024.6.3 (the one I first installed and previous one) and it work again

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.