Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/daily events #32

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

tarik02
Copy link

@tarik02 tarik02 commented Nov 22, 2024

No description provided.

@tarik02
Copy link
Author

tarik02 commented Nov 22, 2024

closes #31

@ALERTua
Copy link
Contributor

ALERTua commented Nov 24, 2024

@denysdovhan Можу підтвердити, що із цими змінами календар для моєї групи містить актуальні дані: сьогодні відключень не було, завтра їх не буде, а на післязавтра актуальний календар інформації не має, тому бере за основу прогноз. Як і повинно бути.

@ALERTua
Copy link
Contributor

ALERTua commented Nov 25, 2024

Київ, третя група.

2024-11-25 13:26:14.890 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-25 13:26:14.890417+02:00
2024-11-25 13:26:14.890 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 266, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 481, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 176, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 561, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/components/calendar/__init__.py", line 541, in async_write_ha_state
    super().async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1007, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1069, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1013, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/calendar/__init__.py", line 524, in state
    if (event := self.event) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/yasno_outages/calendar.py", line 55, in event
    return self.coordinator.get_event_at(now)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/yasno_outages/coordinator.py", line 160, in get_event_at
    event = self.api.get_current_event(at)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/yasno_outages/api.py", line 95, in get_current_event
    for event in self.gen_events(at, at + datetime.timedelta(days=1)):
  File "/config/custom_components/yasno_outages/api.py", line 202, in gen_events
    if last["summary"] != "none" and last["end"] > now and s >= start_date:
                                     ~~~~^^^^^^^
KeyError: 'end'

@tarik02
Copy link
Author

tarik02 commented Nov 25, 2024

@ALERTua fixed

@ardeus-ua
Copy link

ardeus-ua commented Nov 25, 2024

@ALERTua fixed

Київ 5

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 599, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 918, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1368, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1007, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
self.__async_calculate_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1069, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1013, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 544, in state
value = self.native_value
^^^^^^^^^^^^^^^^^
File "/config/custom_components/yasno_outages/sensor.py", line 99, in native_value
return self.entity_description.val_func(self.coordinator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/yasno_outages/sensor.py", line 38, in
val_func=lambda coordinator: coordinator.current_state,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/yasno_outages/coordinator.py", line 155, in current_state
event = self.get_event_at(now)
^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/yasno_outages/coordinator.py", line 160, in get_event_at
event = self.api.get_current_event(at)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/yasno_outages/api.py", line 95, in get_current_event
for event in self.gen_events(at, at + datetime.timedelta(days=1)):
File "/config/custom_components/yasno_outages/api.py", line 202, in gen_events
if last["summary"] != "none" and last["end"] > now and s >= start_date:
~~~~^^^^^^^
KeyError: 'end'

@ardeus-ua
Copy link

@tarik02 встановлював заміною одного файлу та перезавантаженням. Можливо потрібно щось ще замінити?

@ALERTua
Copy link
Contributor

ALERTua commented Nov 25, 2024

@ALERTua fixed

ага, підтягнув, тестую.

змінив групу туди-сюди. вилізла помилка із мінімальною тривалістю івента

2024-11-25 14:57:43.809 DEBUG (MainThread) [custom_components.yasno_outages.config_flow] User input: {'group': '3'}
2024-11-25 14:57:43.809 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Updating group from 1 -> 3
2024-11-25 14:57:43.944 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Finished fetching yasno_outages data in 0.135 seconds (success: True)
2024-11-25 14:57:43.944 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-25 14:57:43.944219+02:00
2024-11-25 14:57:43.944 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-25 14:57:43.944449+02:00
2024-11-25 14:57:43.944 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-25 14:57:43.944628+02:00
2024-11-25 14:57:43.945 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-25 14:57:43.944930+02:00 -> 2024-11-25 00:00:00+02:00)
2024-11-25 14:57:43.945 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 205, in __call__
    return self._compiled([], data)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 256, in _run
    return self._exec(self._compiled, value, path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 386, in _exec
    raise e if self.msg is None else AllInvalid(self.msg, path=path)
  File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 384, in _exec
    v = func(path, v)
        ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 779, in validate_callable
    return schema(data)
           ^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/calendar/__init__.py", line 148, in validate
    raise vol.Invalid(
voluptuous.error.Invalid: Expected minimum event duration of 0:00:00 (2024-11-25 14:57:43.944930+02:00, 2024-11-25 00:00:00+02:00)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/calendar/__init__.py", line 386, in __post_init__
    CALENDAR_EVENT_SCHEMA(dataclasses.asdict(self, dict_factory=skip_none))
  File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 209, in __call__
    raise er.MultipleInvalid([e])
voluptuous.error.MultipleInvalid: Expected minimum event duration of 0:00:00 (2024-11-25 14:57:43.944930+02:00, 2024-11-25 00:00:00+02:00)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/config/custom_components/yasno_outages/coordinator.py", line 88, in update_config
    await self.async_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 358, in async_refresh
    await self._async_refresh(log_failures=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 481, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 176, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 561, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1007, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1069, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1013, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 544, in state
    value = self.native_value
            ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/yasno_outages/sensor.py", line 99, in native_value
    return self.entity_description.val_func(self.coordinator)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/yasno_outages/sensor.py", line 45, in 
    val_func=lambda coordinator: coordinator.next_outage,
                                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/yasno_outages/coordinator.py", line 127, in next_outage
    event = self._get_next_event_of_type(STATE_OFF)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/yasno_outages/coordinator.py", line 111, in _get_next_event_of_type
    self.get_events_between(
  File "/config/custom_components/yasno_outages/coordinator.py", line 173, in get_events_between
    self._get_calendar_event(event, translate=translate) for event in events
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/yasno_outages/coordinator.py", line 198, in _get_calendar_event
    return CalendarEvent(
           ^^^^^^^^^^^^^^
  File "", line 11, in __init__
  File "/usr/src/homeassistant/homeassistant/components/calendar/__init__.py", line 388, in __post_init__
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Failed to validate CalendarEvent: Expected minimum event duration of 0:00:00 (2024-11-25 14:57:43.944930+02:00, 2024-11-25 00:00:00+02:00)

@tarik02
Copy link
Author

tarik02 commented Nov 25, 2024

what about now?

@ardeus-ua
Copy link

what about now?

image Works!

@ALERTua
Copy link
Contributor

ALERTua commented Nov 25, 2024

what about now?

працює. помилок поки немає. дивлюсь в логи, буду репортити.

@ALERTua
Copy link
Contributor

ALERTua commented Nov 25, 2024

не розумію POSSIBLE_OUTAGE 26 числа (вівторок) о другій ночі. цієї події немає в Ясно
image

image

image

image

2024-11-25 15:57:14.920 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Finished fetching yasno_outages data in 0.132 seconds (success: True)
2024-11-25 15:57:14.920 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-25 15:57:14.920808+02:00
2024-11-25 15:57:14.921 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-25 15:57:14.921063+02:00
2024-11-25 15:57:14.921 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-25 15:57:14.921249+02:00
2024-11-25 15:57:14.921 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-26 02:00:00+02:00 -> 2024-11-26 05:00:00+02:00)
2024-11-25 15:57:14.921 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: DEFINITE_OUTAGE (2024-11-26 07:00:00+02:00 -> 2024-11-26 11:00:00+02:00)
2024-11-25 15:57:14.922 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-26 11:00:00+02:00 -> 2024-11-26 14:00:00+02:00)
2024-11-25 15:57:14.922 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next events: [CalendarEvent(start=datetime.datetime(2024, 11, 26, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 26, 5, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 26, 7, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 26, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 26, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 26, 14, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)]
2024-11-25 15:57:14.922 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next outage: CalendarEvent(start=datetime.datetime(2024, 11, 26, 7, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 26, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)
2024-11-25 15:57:14.922 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-26 02:00:00+02:00 -> 2024-11-26 05:00:00+02:00)
2024-11-25 15:57:14.922 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: DEFINITE_OUTAGE (2024-11-26 07:00:00+02:00 -> 2024-11-26 11:00:00+02:00)
2024-11-25 15:57:14.923 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next events: [CalendarEvent(start=datetime.datetime(2024, 11, 26, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 26, 5, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 26, 7, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 26, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 26, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 26, 14, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)]
2024-11-25 15:57:14.923 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next possible outage: CalendarEvent(start=datetime.datetime(2024, 11, 26, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 26, 5, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)
2024-11-25 15:57:14.923 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-26 02:00:00+02:00 -> 2024-11-26 05:00:00+02:00)
2024-11-25 15:57:14.923 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: DEFINITE_OUTAGE (2024-11-26 07:00:00+02:00 -> 2024-11-26 11:00:00+02:00)
2024-11-25 15:57:14.923 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-26 11:00:00+02:00 -> 2024-11-26 14:00:00+02:00)
2024-11-25 15:57:14.924 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next connectivity: CalendarEvent(start=datetime.datetime(2024, 11, 26, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 26, 5, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)

@tarik02
Copy link
Author

tarik02 commented Nov 25, 2024

@ALERTua в ясно якраз таки є
зображення

@ALERTua
Copy link
Contributor

ALERTua commented Nov 25, 2024

хз. ось генерований графік із додатку Київ Цифровий, де реально актуальні дані на наступні два дні, що і є новою фічою. і на ньому немає сірих зон
https://kyiv.digital/storage/dtek/generated/schedule_3.pdf?v=1732466259

@tarik02
Copy link
Author

tarik02 commented Nov 25, 2024

Та я знаю це, але ми парсимо сайт ясно і на сайті ясно воно так... + можеш глянути main в ha-hysno-outages - побачиш те ж саме

@tarik02
Copy link
Author

tarik02 commented Nov 25, 2024

Є інакша опція - парсити pdf за посиланням яке ти скинув.

@ALERTua
Copy link
Contributor

ALERTua commented Nov 25, 2024

не маю гадки навіть, як розпарсити таблицю із pdf, але отой int в кінці — таймстемп дати генерації. приймає будь-який.

timestamp = int(pendulum.now(tz=pendulum.local_timezone()).timestamp())

https://{city}.digital/storage/dtek/generated/schedule_{group}.pdf?v={timestamp}

@ardeus-ua
Copy link

хз. ось генерований графік із додатку Київ Цифровий, де реально актуальні дані на наступні два дні, що і є новою фічою. і на ньому немає сірих зон https://kyiv.digital/storage/dtek/generated/schedule_3.pdf?v=1732466259

Підкажіть, часом не співпадає графік до кінця тижня з тим що було на минулому тижні? тоді це не прогноз а історичні дані і в принципі вони не актуальні на цей тиждень

@infestonn
Copy link

Is it possible to display the next day schedule with updated data(if it exists) from Yasno?
The current day works good.

@ALERTua
Copy link
Contributor

ALERTua commented Nov 27, 2024

щось точно не так.
третя група. зараз 10:52. світла немає з десяти. календар показує все згідно з Ясно: з 10 до 13 не буде світла. і це єдина подія за день.
image
сенсори показують що попало. типу електрика є, next restore неадекватний. next connectivity неадекватний.
image

логи:

2024-11-27 10:56:00.444 DEBUG (MainThread) [custom_components.yasno_outages.config_flow] City selected: {'city': 'kiev'}
2024-11-27 10:56:00.444 DEBUG (MainThread) [custom_components.yasno_outages.config_flow] Getting kiev groups: dict_keys(['group_1', 'group_2', 'group_3', 'group_4', 'group_5', 'group_6'])
2024-11-27 10:56:02.856 DEBUG (MainThread) [custom_components.yasno_outages.config_flow] User input: {'group': '3'}
2024-11-27 10:56:02.856 INFO (MainThread) [custom_components.yasno_outages] Setup entry: <ConfigEntry entry_id=01JDPDBB18S55TJAB8RHN1KVWH version=1 domain=yasno_outages title=Yasno Outages state=ConfigEntryState.SETUP_IN_PROGRESS unique_id=None>
2024-11-27 10:56:02.994 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Finished fetching yasno_outages data in 0.137 seconds (success: True)
2024-11-27 10:56:02.994 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Setup new entry: <ConfigEntry entry_id=01JDPDBB18S55TJAB8RHN1KVWH version=1 domain=yasno_outages title=Yasno Outages state=ConfigEntryState.SETUP_IN_PROGRESS unique_id=None>
2024-11-27 10:56:02.996 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-27 10:56:02.996281+02:00
2024-11-27 10:56:02.996 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-27 10:56:02.996622+02:00
2024-11-27 10:56:02.997 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-27 10:56:02.997041+02:00
2024-11-27 10:56:02.997 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-27 10:56:02.997334+02:00
2024-11-27 10:56:02.997 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-27 10:56:02.997610+02:00
2024-11-27 10:56:02.999 DEBUG (MainThread) [custom_components.yasno_outages.calendar] Getting current event for 2024-11-27 10:56:02.999037+02:00
2024-11-27 10:56:03.000 DEBUG (MainThread) [custom_components.yasno_outages.sensor] Setup new entry: <ConfigEntry entry_id=01JDPDBB18S55TJAB8RHN1KVWH version=1 domain=yasno_outages title=Yasno Outages state=ConfigEntryState.SETUP_IN_PROGRESS unique_id=None>
2024-11-27 10:56:03.006 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 00:00:00+02:00 -> 2024-11-28 02:00:00+02:00)
2024-11-27 10:56:03.006 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: DEFINITE_OUTAGE (2024-11-28 04:00:00+02:00 -> 2024-11-28 08:00:00+02:00)
2024-11-27 10:56:03.007 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 08:00:00+02:00 -> 2024-11-28 11:00:00+02:00)
2024-11-27 10:56:03.007 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next events: [CalendarEvent(start=datetime.datetime(2024, 11, 28, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 4, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)]
2024-11-27 10:56:03.007 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next outage: CalendarEvent(start=datetime.datetime(2024, 11, 28, 4, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)
2024-11-27 10:56:03.007 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 00:00:00+02:00 -> 2024-11-28 02:00:00+02:00)
2024-11-27 10:56:03.008 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: DEFINITE_OUTAGE (2024-11-28 04:00:00+02:00 -> 2024-11-28 08:00:00+02:00)
2024-11-27 10:56:03.008 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 08:00:00+02:00 -> 2024-11-28 11:00:00+02:00)
2024-11-27 10:56:03.008 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next events: [CalendarEvent(start=datetime.datetime(2024, 11, 28, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 4, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)]
2024-11-27 10:56:03.008 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next outage: CalendarEvent(start=datetime.datetime(2024, 11, 28, 4, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)
2024-11-27 10:56:03.013 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 00:00:00+02:00 -> 2024-11-28 02:00:00+02:00)
2024-11-27 10:56:03.013 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: DEFINITE_OUTAGE (2024-11-28 04:00:00+02:00 -> 2024-11-28 08:00:00+02:00)
2024-11-27 10:56:03.014 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 08:00:00+02:00 -> 2024-11-28 11:00:00+02:00)
2024-11-27 10:56:03.014 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next events: [CalendarEvent(start=datetime.datetime(2024, 11, 28, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 4, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)]
2024-11-27 10:56:03.014 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next possible outage: CalendarEvent(start=datetime.datetime(2024, 11, 28, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)
2024-11-27 10:56:03.014 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 00:00:00+02:00 -> 2024-11-28 02:00:00+02:00)
2024-11-27 10:56:03.014 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: DEFINITE_OUTAGE (2024-11-28 04:00:00+02:00 -> 2024-11-28 08:00:00+02:00)
2024-11-27 10:56:03.015 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 08:00:00+02:00 -> 2024-11-28 11:00:00+02:00)
2024-11-27 10:56:03.015 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next events: [CalendarEvent(start=datetime.datetime(2024, 11, 28, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 4, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)]
2024-11-27 10:56:03.015 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next possible outage: CalendarEvent(start=datetime.datetime(2024, 11, 28, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)
2024-11-27 10:56:03.019 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 00:00:00+02:00 -> 2024-11-28 02:00:00+02:00)
2024-11-27 10:56:03.020 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: DEFINITE_OUTAGE (2024-11-28 04:00:00+02:00 -> 2024-11-28 08:00:00+02:00)
2024-11-27 10:56:03.020 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 08:00:00+02:00 -> 2024-11-28 11:00:00+02:00)
2024-11-27 10:56:03.020 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next events: [CalendarEvent(start=datetime.datetime(2024, 11, 28, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 4, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)]
2024-11-27 10:56:03.020 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next connectivity: CalendarEvent(start=datetime.datetime(2024, 11, 28, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)
2024-11-27 10:56:03.021 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 00:00:00+02:00 -> 2024-11-28 02:00:00+02:00)
2024-11-27 10:56:03.021 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: DEFINITE_OUTAGE (2024-11-28 04:00:00+02:00 -> 2024-11-28 08:00:00+02:00)
2024-11-27 10:56:03.021 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Transforming event: POSSIBLE_OUTAGE (2024-11-28 08:00:00+02:00 -> 2024-11-28 11:00:00+02:00)
2024-11-27 10:56:03.021 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next events: [CalendarEvent(start=datetime.datetime(2024, 11, 28, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 4, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='DEFINITE_OUTAGE', description='DEFINITE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None), CalendarEvent(start=datetime.datetime(2024, 11, 28, 8, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 11, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)]
2024-11-27 10:56:03.021 DEBUG (MainThread) [custom_components.yasno_outages.coordinator] Next connectivity: CalendarEvent(start=datetime.datetime(2024, 11, 28, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), end=datetime.datetime(2024, 11, 28, 2, 0, tzinfo=zoneinfo.ZoneInfo(key='Europe/Kiev')), summary='POSSIBLE_OUTAGE', description='POSSIBLE_OUTAGE', location=None, uid=None, recurrence_id=None, rrule=None)

@arthur-kalmykov
Copy link

arthur-kalmykov commented Nov 27, 2024

все згідно з Ясно: з 10 до 13 не буде світла.

Але і в 3й групі до 14 відключення

@andrewjswan
Copy link

image

@ALERTua
Copy link
Contributor

ALERTua commented Nov 27, 2024

8a5d442
10-14 fixed
next connectivity fixed
current outage fixed.
дуже дякую!
від мене поки багів немає. дивлюсь далі.
(@denysdovhan це вже можна мерджити, як на мене)

@EvGeniyLell
Copy link

підкажіть чи є спосіб запустити ХА у сейф моді (чи щось таке де не запускаються ніякі адони чи інтеграціі) а то взагалі небожу нічого зробити. веб морда не доступна, хоча можу бачити в сітці ХА пост і файли на ньому

@chertvl
Copy link

chertvl commented Dec 16, 2024

підкажіть чи є спосіб запустити ХА у сейф моді (чи щось таке де не запускаються ніякі адони чи інтеграціі) а то взагалі небожу нічого зробити. веб морда не доступна, хоча можу бачити в сітці ХА пост і файли на ньому

Через консольку можна ввести
ha core restart --safe-mode
Підключивши до сервера монітор та клавіатуру

@ALERTua
Copy link
Contributor

ALERTua commented Dec 16, 2024

блін, це через нього!? я вже три години з цим люблюся!

сподіваюся, ви встановили ssh аддон.

rm -rf /config/custom_components/yasno_outages

@andrewjswan
Copy link

Look like fixed ...
tarik02#1

@BOPOHOP
Copy link

BOPOHOP commented Dec 16, 2024

Look like fixed ... tarik02#1

Не зовсім...

Додану інтеграцию неможливо налаштувати (вибрати місто) -- зараз в api немає electricity-outages-schedule, а весь розклад в electricity-outages-schedule (тижневий також) тому воно не може отримати перелік міст

Якщо в dailySchedule немає наступних відключень (все вже відбулося) то десь раз в 15 хвилин homeassistant деякий час зжирае весь CPU та не відповидае в WEB і не реагує на event-и (але само відновлюется), в log в цей час присутне
File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/entity.py", line 1085, in __async_calculate_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/entity.py", line 1029, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/sensor/__init__.py", line 557, in state value = self.native_value ^^^^^^^^^^^^^^^^^ File "/home/homeassistant/.homeassistant/custom_components/yasno_outages/sensor.py", line 99, in native_value return self.entity_description.val_func(self.coordinator) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/homeassistant/.homeassistant/custom_components/yasno_outages/sensor.py", line 45, in <lambda> val_func=lambda coordinator: coordinator.next_outage, ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/homeassistant/.homeassistant/custom_components/yasno_outages/coordinator.py", line 111, in next_outage for ev in self.api.gen_events(now): File "/home/homeassistant/.homeassistant/custom_components/yasno_outages/api.py", line 175, in gen_events for ev in heapq.merge( File "/usr/local/lib/python3.12/heapq.py", line 394, in merge yield from next.__self__ File "/home/homeassistant/.homeassistant/custom_components/yasno_outages/api.py", line 133, in gen_schedule_recurrent_events yield from self.gen_event(cday, event) File "/home/homeassistant/.homeassistant/custom_components/yasno_outages/api.py", line 111, in gen_event "at": self._build_event_hour(base_date, event["end"]), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/homeassistant/.homeassistant/custom_components/yasno_outages/api.py", line 68, in _build_event_hour date = date + datetime.timedelta(days=1) ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

@trianglesis
Copy link

Схожа проблема, весь десь вбив, вийшов на рішення через це:

franc6/ics_calendar#200 (comment)

Можливо з календарями трабла.

@tarik02
Copy link
Author

tarik02 commented Dec 16, 2024

@andrewjswan ти в контексті, то у нас таки є проблема чи ні і чи потрібен твій фікс? бо по розмові бачу що проблема в ics_calendar

оффтоп: пів дня на фоні пробував зрозуміти чого ha не стартує, треба було просто заглянути на гітхаб))

@andrewjswan
Copy link

ти в контексті, то у нас таки є проблема чи ні і чи потрібен твій фікс?

Тільки доповз додому, є одна проблема з вибором груп, спробую зараз фіксанути.

@andrewjswan
Copy link

@tarik02 Сподіваюся пофіксував, принаймні місто вибрало, групу додав, календар із даними отримав.

@andrewjswan
Copy link

то у нас таки є проблема чи ні і чи потрібен твій фікс

Проблема є, schedule на тиждень з API прибрали, тому вся логіка, яка була на ньому впала, вибір міста, вибір групи, ну і так по дрібницях. Поки в API є можливий schedule на один день і dailySchedule ... все ...

@BOPOHOP
Copy link

BOPOHOP commented Dec 16, 2024

то у нас таки є проблема чи ні і чи потрібен твій фікс

Проблема є, schedule на тиждень з API прибрали, тому вся логіка, яка була на ньому впала, вибір міста, вибір групи, ну і так по дрібницях. Поки в API є можливий schedule на один день і dailySchedule ... все ...

Не прибрали, а перетасували...
electricity-outages-daily-schedule.schedule -- тиждень
electricity-outages-daily-schedule.dailySchedule - доба (? + наступна доба)

@andrewjswan
Copy link

electricity-outages-daily-schedule.schedule -- тиждень

Тиждень, але не той, який був, це можливі відключення на тиждень, але можуть змінюватися щодня і там тільки можливі відключення.

доба (? + наступна доба)

Так, там today [tomorrow]

@tarik02
Copy link
Author

tarik02 commented Dec 17, 2024

Такс, тепер нормально усе підтягується (правда треба переналаштувати групу). Але тепер графік дає тільки можливі відключення, тому "Наступне відключення" завжди невідоме.

А ще, зафіксав проблемку з зависаннями при недоступності.

@tarik02
Copy link
Author

tarik02 commented Dec 17, 2024

А ще графік на yasno не співпадає з Київ цифровий, в мене сьогодні в ньому нема відключень, а ясно каже що є

@andrewjswan
Copy link

а ясно каже що є

image

@andrewjswan
Copy link

Цікаво за такої відповіді АПІ, дасть додати Місто та Групу. Там у нас зав'язка була на тижневий розклад, зараз його немає. Я додав поточне, його теж немає, є тільки он то можливе, але на мою думку ми на нього не спираємося.

@tarik02
Copy link
Author

tarik02 commented Dec 17, 2024

зображення

сайт показує таке - проблема у ясно

@andrewjswan
Copy link

сайт показує таке - проблема у ясно

Так це якраз ті можливі показує, толку від них немає.

@BOPOHOP
Copy link

BOPOHOP commented Dec 17, 2024

Цікаво за такої відповіді АПІ, дасть додати Місто та Групу. Там у нас зав'язка була на тижневий розклад, зараз його немає. Я додав поточне, його теж немає, є тільки он то можливе, але на мою думку ми на нього не спираємося.

Так, коли зробили добовий розклад то тижневий розклад фактично став "можливим", зараз вони це зафікcували в API (та в можливий зробили чорно-білим, викинувши сіри зони). IMHO перелік міст та груп в них треба брати (для налаштування) с усіх доступних розкладів, інакше отримаемо неможливість нових налаштувань в добу без відключень

@tarik02
Copy link
Author

tarik02 commented Dec 17, 2024

@BOPOHOP так, виглядає так воно
пізніше апдейтну код

@andrewjswan andrewjswan mentioned this pull request Dec 19, 2024
@000al000
Copy link

Може хтось зробить свій форк, бо здається у автора вже нема часу займатись проектом :(

@andrewjswan
Copy link

Ну можна спокійно поки що руками оновити, встановити офіційний і забрати 2 файли з цього Pull Request.

@tarik02
Copy link
Author

tarik02 commented Dec 19, 2024

@000al000 треба щоб хтось взяв відповідальність за це. Я б з радістю, але боюсь що це може закінчитись як і з цим проектом
Або є варіант зробити організацію на гітхабі і мейнтейнити це все разом)

@k-korn
Copy link

k-korn commented Dec 26, 2024

Поки чекав на фікс, зробив мінімальний скрипт котрий конвертує dailySchedule в івенти в гугл календарях.
Свою групу можна забрати тут: https://sites.google.com/view/outrage-calendar-kyiv, додати в календар і бачити відразу коли буде відключення.

@andrewjswan
Copy link

такі календарі вже є, але ical доданий до Google календар буде оновлюватися раз на добу.

@andrewjswan
Copy link

#41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.