homeassistant 2025.9.0b1__py3-none-any.whl → 2025.9.0b3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- homeassistant/components/accuweather/translations/sensor.sr-Latn.json +9 -0
- homeassistant/components/accuweather/translations/sensor.sr.json +9 -0
- homeassistant/components/accuweather/translations/sr-Latn.json +101 -0
- homeassistant/components/accuweather/translations/sr.json +101 -0
- homeassistant/components/ai_task/services.yaml +0 -1
- homeassistant/components/ai_task/translations/el.json +22 -0
- homeassistant/components/ai_task/translations/ru.json +22 -0
- homeassistant/components/airgradient/translations/lt.json +2 -1
- homeassistant/components/airgradient/translations/ru.json +1 -0
- homeassistant/components/airos/translations/lt.json +5 -0
- homeassistant/components/aladdin_connect/manifest.json +1 -1
- homeassistant/components/aladdin_connect/translations/ca.json +28 -0
- homeassistant/components/aladdin_connect/translations/el.json +30 -1
- homeassistant/components/aladdin_connect/translations/ru.json +30 -1
- homeassistant/components/alexa_devices/manifest.json +1 -1
- homeassistant/components/alexa_devices/services.py +3 -8
- homeassistant/components/alexa_devices/services.yaml +41 -476
- homeassistant/components/alexa_devices/strings.json +42 -469
- homeassistant/components/alexa_devices/translations/bg.json +0 -8
- homeassistant/components/alexa_devices/translations/cs.json +42 -469
- homeassistant/components/alexa_devices/translations/de.json +42 -469
- homeassistant/components/alexa_devices/translations/en-GB.json +1 -475
- homeassistant/components/alexa_devices/translations/en.json +42 -469
- homeassistant/components/alexa_devices/translations/es.json +0 -307
- homeassistant/components/alexa_devices/translations/et.json +42 -469
- homeassistant/components/alexa_devices/translations/fr.json +0 -9
- homeassistant/components/alexa_devices/translations/ga.json +0 -477
- homeassistant/components/alexa_devices/translations/lt.json +68 -294
- homeassistant/components/alexa_devices/translations/nl.json +11 -9
- homeassistant/components/alexa_devices/translations/pt.json +42 -469
- homeassistant/components/alexa_devices/translations/sk.json +42 -469
- homeassistant/components/alexa_devices/translations/sv.json +0 -8
- homeassistant/components/alexa_devices/translations/zh-Hans.json +0 -387
- homeassistant/components/alexa_devices/translations/zh-Hant.json +42 -469
- homeassistant/components/anthemav/translations/lt.json +2 -1
- homeassistant/components/asuswrt/bridge.py +18 -2
- homeassistant/components/august/translations/lt.json +3 -0
- homeassistant/components/backup/manager.py +2 -1
- homeassistant/components/bang_olufsen/translations/lt.json +4 -0
- homeassistant/components/bayesian/strings.json +1 -1
- homeassistant/components/bayesian/translations/el.json +102 -0
- homeassistant/components/bayesian/translations/ga.json +41 -4
- homeassistant/components/bayesian/translations/lt.json +44 -7
- homeassistant/components/bayesian/translations/ru.json +257 -0
- homeassistant/components/bayesian/translations/sv.json +11 -0
- homeassistant/components/bluetooth/__init__.py +1 -1
- homeassistant/components/bluetooth/manifest.json +2 -2
- homeassistant/components/bosch_alarm/translations/lt.json +3 -0
- homeassistant/components/braviatv/entity.py +10 -4
- homeassistant/components/bsblan/climate.py +4 -0
- homeassistant/components/bsblan/config_flow.py +1 -1
- homeassistant/components/bsblan/sensor.py +23 -3
- homeassistant/components/bsblan/water_heater.py +22 -2
- homeassistant/components/buienradar/translations/sr-Latn.json +128 -0
- homeassistant/components/buienradar/translations/sr.json +128 -0
- homeassistant/components/button/translations/lt.json +1 -0
- homeassistant/components/camera/translations/ru.json +2 -2
- homeassistant/components/conversation/manifest.json +1 -1
- homeassistant/components/deconz/translations/ga.json +6 -2
- homeassistant/components/device_tracker/translations/ga.json +9 -0
- homeassistant/components/devolo_home_control/translations/lt.json +3 -0
- homeassistant/components/devolo_home_network/translations/lt.json +7 -1
- homeassistant/components/devolo_home_network/translations/ru.json +3 -0
- homeassistant/components/dominos/translations/lt.json +2 -0
- homeassistant/components/dominos/translations/ru.json +2 -0
- homeassistant/components/dsmr/translations/lt.json +2 -1
- homeassistant/components/dsmr_reader/translations/ga.json +34 -0
- homeassistant/components/dsmr_reader/translations/lt.json +1 -0
- homeassistant/components/ecobee/translations/ga.json +20 -1
- homeassistant/components/efergy/translations/ga.json +6 -0
- homeassistant/components/elkm1/translations/ga.json +6 -1
- homeassistant/components/emoncms/translations/lt.json +8 -0
- homeassistant/components/environment_canada/translations/sr-Latn.json +9 -0
- homeassistant/components/environment_canada/translations/sr.json +9 -0
- homeassistant/components/esphome/translations/ga.json +29 -4
- homeassistant/components/fan/translations/ga.json +25 -1
- homeassistant/components/filesize/translations/ga.json +12 -0
- homeassistant/components/fireservicerota/translations/ga.json +3 -1
- homeassistant/components/flo/translations/ga.json +16 -0
- homeassistant/components/flume/translations/ga.json +1 -0
- homeassistant/components/flux_led/translations/ga.json +78 -1
- homeassistant/components/foscam/translations/ga.json +13 -0
- homeassistant/components/foscam/translations/lt.json +3 -0
- homeassistant/components/fritz/translations/ga.json +49 -6
- homeassistant/components/fritz/translations/lt.json +3 -0
- homeassistant/components/fritz/translations/ru.json +3 -0
- homeassistant/components/fritzbox/translations/ca.json +1 -3
- homeassistant/components/fritzbox/translations/cs.json +2 -2
- homeassistant/components/fritzbox/translations/de.json +3 -3
- homeassistant/components/fritzbox/translations/el.json +2 -2
- homeassistant/components/fritzbox/translations/en-GB.json +2 -2
- homeassistant/components/fritzbox/translations/en.json +2 -2
- homeassistant/components/fritzbox/translations/es-419.json +0 -6
- homeassistant/components/fritzbox/translations/es.json +1 -3
- homeassistant/components/fritzbox/translations/et.json +2 -2
- homeassistant/components/fritzbox/translations/fi.json +1 -3
- homeassistant/components/fritzbox/translations/fr.json +1 -3
- homeassistant/components/fritzbox/translations/ga.json +0 -1
- homeassistant/components/fritzbox/translations/hu.json +1 -3
- homeassistant/components/fritzbox/translations/id.json +1 -3
- homeassistant/components/fritzbox/translations/it.json +1 -3
- homeassistant/components/fritzbox/translations/ja.json +1 -3
- homeassistant/components/fritzbox/translations/ko.json +1 -3
- homeassistant/components/fritzbox/translations/lb.json +2 -4
- homeassistant/components/fritzbox/translations/lt.json +2 -2
- homeassistant/components/fritzbox/translations/nb.json +1 -3
- homeassistant/components/fritzbox/translations/nl.json +1 -3
- homeassistant/components/fritzbox/translations/pl.json +1 -3
- homeassistant/components/fritzbox/translations/pt-BR.json +1 -3
- homeassistant/components/fritzbox/translations/pt.json +2 -2
- homeassistant/components/fritzbox/translations/ro.json +1 -3
- homeassistant/components/fritzbox/translations/ru.json +2 -2
- homeassistant/components/fritzbox/translations/sk.json +2 -2
- homeassistant/components/fritzbox/translations/sl.json +1 -3
- homeassistant/components/fritzbox/translations/sv.json +1 -3
- homeassistant/components/fritzbox/translations/tr.json +1 -3
- homeassistant/components/fritzbox/translations/uk.json +1 -3
- homeassistant/components/fritzbox/translations/vi.json +2 -4
- homeassistant/components/fritzbox/translations/zh-Hans.json +2 -2
- homeassistant/components/fritzbox/translations/zh-Hant.json +2 -2
- homeassistant/components/fritzbox_callmonitor/translations/ca.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/cs.json +2 -2
- homeassistant/components/fritzbox_callmonitor/translations/de.json +3 -3
- homeassistant/components/fritzbox_callmonitor/translations/el.json +2 -2
- homeassistant/components/fritzbox_callmonitor/translations/en-GB.json +2 -2
- homeassistant/components/fritzbox_callmonitor/translations/en.json +2 -2
- homeassistant/components/fritzbox_callmonitor/translations/es-419.json +0 -3
- homeassistant/components/fritzbox_callmonitor/translations/es.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/et.json +2 -2
- homeassistant/components/fritzbox_callmonitor/translations/fi.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/fr.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/ga.json +16 -0
- homeassistant/components/fritzbox_callmonitor/translations/hu.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/id.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/it.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/ja.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/ko.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/lt.json +2 -2
- homeassistant/components/fritzbox_callmonitor/translations/nb.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/nl.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/pl.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/pt-BR.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/pt.json +2 -2
- homeassistant/components/fritzbox_callmonitor/translations/ro.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/ru.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/sk.json +2 -2
- homeassistant/components/fritzbox_callmonitor/translations/sv.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/tr.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/uk.json +0 -1
- homeassistant/components/fritzbox_callmonitor/translations/zh-Hans.json +2 -2
- homeassistant/components/fritzbox_callmonitor/translations/zh-Hant.json +2 -2
- homeassistant/components/fronius/translations/ga.json +69 -0
- homeassistant/components/frontend/manifest.json +1 -1
- homeassistant/components/fully_kiosk/translations/ga.json +26 -0
- homeassistant/components/fyta/translations/ga.json +1 -0
- homeassistant/components/generic/translations/ga.json +36 -0
- homeassistant/components/geofency/translations/ga.json +18 -0
- homeassistant/components/geonetnz_quakes/translations/ga.json +4 -0
- homeassistant/components/gios/translations/ga.json +2 -0
- homeassistant/components/github/translations/ga.json +23 -0
- homeassistant/components/glances/translations/ga.json +10 -0
- homeassistant/components/goalzero/translations/ga.json +3 -0
- homeassistant/components/goalzero/translations/lt.json +3 -0
- homeassistant/components/goodwe/translations/ga.json +16 -0
- homeassistant/components/google/translations/ga.json +7 -0
- homeassistant/components/google_generative_ai_conversation/translations/lt.json +5 -0
- homeassistant/components/google_mail/translations/ga.json +24 -2
- homeassistant/components/google_sheets/translations/ga.json +6 -0
- homeassistant/components/google_travel_time/translations/lt.json +3 -2
- homeassistant/components/govee_ble/translations/ga.json +18 -0
- homeassistant/components/govee_light_local/__init__.py +6 -1
- homeassistant/components/govee_light_local/config_flow.py +7 -12
- homeassistant/components/govee_light_local/coordinator.py +2 -3
- homeassistant/components/gpslogger/translations/ga.json +1 -0
- homeassistant/components/group/translations/ga.json +31 -2
- homeassistant/components/growatt_server/translations/ga.json +127 -0
- homeassistant/components/habitica/translations/ga.json +7 -2
- homeassistant/components/habitica/translations/lt.json +2 -1
- homeassistant/components/harmony/translations/ga.json +32 -2
- homeassistant/components/hassio/translations/ga.json +51 -1
- homeassistant/components/hassio/translations/lt.json +29 -0
- homeassistant/components/here_travel_time/translations/ga.json +11 -0
- homeassistant/components/here_travel_time/translations/lt.json +2 -1
- homeassistant/components/hisense_aehw4a1/translations/ga.json +13 -0
- homeassistant/components/history_stats/translations/ga.json +6 -0
- homeassistant/components/hive/translations/ga.json +7 -0
- homeassistant/components/home_connect/translations/ga.json +5 -1
- homeassistant/components/home_connect/translations/lt.json +21 -11
- homeassistant/components/home_connect/translations/ru.json +9 -6
- homeassistant/components/homeassistant_yellow/translations/ga.json +61 -2
- homeassistant/components/homekit/__init__.py +2 -3
- homeassistant/components/homekit/services.yaml +7 -3
- homeassistant/components/homekit/strings.json +7 -1
- homeassistant/components/homekit/translations/cs.json +7 -1
- homeassistant/components/homekit/translations/de.json +6 -0
- homeassistant/components/homekit/translations/el.json +0 -1
- homeassistant/components/homekit/translations/en-GB.json +7 -1
- homeassistant/components/homekit/translations/en.json +7 -1
- homeassistant/components/homekit/translations/es.json +0 -1
- homeassistant/components/homekit/translations/et.json +7 -1
- homeassistant/components/homekit/translations/ga.json +0 -1
- homeassistant/components/homekit/translations/hu.json +0 -1
- homeassistant/components/homekit/translations/it.json +6 -0
- homeassistant/components/homekit/translations/ja.json +0 -1
- homeassistant/components/homekit/translations/lt.json +7 -1
- homeassistant/components/homekit/translations/nl.json +5 -0
- homeassistant/components/homekit/translations/pt.json +6 -0
- homeassistant/components/homekit/translations/ru.json +0 -1
- homeassistant/components/homekit/translations/sk.json +6 -0
- homeassistant/components/homekit/translations/sv.json +0 -1
- homeassistant/components/homekit/translations/tr.json +0 -1
- homeassistant/components/homekit/translations/vi.json +0 -1
- homeassistant/components/homekit/translations/zh-Hans.json +6 -1
- homeassistant/components/homekit/translations/zh-Hant.json +6 -0
- homeassistant/components/homekit_controller/translations/ga.json +25 -0
- homeassistant/components/homekit_controller/translations/select.mk.json +7 -0
- homeassistant/components/homematic/translations/ga.json +26 -1
- homeassistant/components/honeywell/translations/ga.json +10 -0
- homeassistant/components/huawei_lte/translations/ga.json +16 -1
- homeassistant/components/hue/translations/ar.json +0 -5
- homeassistant/components/hue/translations/bg.json +0 -1
- homeassistant/components/hue/translations/ca.json +0 -1
- homeassistant/components/hue/translations/cs.json +1 -1
- homeassistant/components/hue/translations/cy.json +0 -1
- homeassistant/components/hue/translations/da.json +0 -1
- homeassistant/components/hue/translations/de.json +1 -1
- homeassistant/components/hue/translations/el.json +1 -1
- homeassistant/components/hue/translations/en-GB.json +1 -1
- homeassistant/components/hue/translations/en.json +1 -1
- homeassistant/components/hue/translations/es-419.json +0 -1
- homeassistant/components/hue/translations/es.json +0 -1
- homeassistant/components/hue/translations/et.json +1 -1
- homeassistant/components/hue/translations/fi.json +0 -1
- homeassistant/components/hue/translations/fr.json +0 -1
- homeassistant/components/hue/translations/ga.json +19 -1
- homeassistant/components/hue/translations/he.json +0 -1
- homeassistant/components/hue/translations/hu.json +0 -1
- homeassistant/components/hue/translations/id.json +0 -1
- homeassistant/components/hue/translations/it.json +0 -1
- homeassistant/components/hue/translations/ja.json +0 -1
- homeassistant/components/hue/translations/ko.json +0 -1
- homeassistant/components/hue/translations/lb.json +0 -1
- homeassistant/components/hue/translations/lt.json +1 -1
- homeassistant/components/hue/translations/nb.json +0 -1
- homeassistant/components/hue/translations/nl.json +0 -1
- homeassistant/components/hue/translations/nn.json +0 -1
- homeassistant/components/hue/translations/pl.json +0 -1
- homeassistant/components/hue/translations/pt-BR.json +0 -1
- homeassistant/components/hue/translations/pt.json +1 -1
- homeassistant/components/hue/translations/ro.json +0 -1
- homeassistant/components/hue/translations/ru.json +0 -1
- homeassistant/components/hue/translations/sk.json +1 -1
- homeassistant/components/hue/translations/sl.json +0 -1
- homeassistant/components/hue/translations/sv.json +0 -1
- homeassistant/components/hue/translations/tr.json +0 -1
- homeassistant/components/hue/translations/uk.json +0 -1
- homeassistant/components/hue/translations/vi.json +0 -1
- homeassistant/components/hue/translations/zh-Hans.json +0 -1
- homeassistant/components/hue/translations/zh-Hant.json +1 -1
- homeassistant/components/hue/v2/group.py +67 -12
- homeassistant/components/humidifier/translations/ga.json +31 -0
- homeassistant/components/husqvarna_automower/manifest.json +1 -1
- homeassistant/components/husqvarna_automower/translations/ca.json +3 -0
- homeassistant/components/husqvarna_automower/translations/mk.json +5 -0
- homeassistant/components/husqvarna_automower_ble/translations/ca.json +35 -0
- homeassistant/components/husqvarna_automower_ble/translations/el.json +4 -0
- homeassistant/components/husqvarna_automower_ble/translations/ga.json +35 -1
- homeassistant/components/hvv_departures/translations/ga.json +2 -1
- homeassistant/components/hydrawise/translations/lt.json +6 -2
- homeassistant/components/icloud/translations/ga.json +60 -1
- homeassistant/components/ifttt/translations/ga.json +2 -0
- homeassistant/components/imap/translations/ga.json +3 -1
- homeassistant/components/imeon_inverter/const.py +2 -1
- homeassistant/components/imeon_inverter/strings.json +1 -0
- homeassistant/components/imeon_inverter/translations/cs.json +1 -0
- homeassistant/components/imeon_inverter/translations/de.json +1 -0
- homeassistant/components/imeon_inverter/translations/el.json +5 -0
- homeassistant/components/imeon_inverter/translations/en-GB.json +1 -0
- homeassistant/components/imeon_inverter/translations/en.json +1 -0
- homeassistant/components/imeon_inverter/translations/et.json +1 -0
- homeassistant/components/imeon_inverter/translations/it.json +5 -0
- homeassistant/components/imeon_inverter/translations/lt.json +26 -0
- homeassistant/components/imeon_inverter/translations/pt.json +1 -0
- homeassistant/components/imeon_inverter/translations/ru.json +21 -0
- homeassistant/components/imeon_inverter/translations/sk.json +1 -0
- homeassistant/components/imeon_inverter/translations/zh-Hant.json +1 -0
- homeassistant/components/inkbird/translations/ga.json +5 -0
- homeassistant/components/input_boolean/translations/ga.json +20 -1
- homeassistant/components/input_button/translations/ga.json +16 -1
- homeassistant/components/input_datetime/translations/ga.json +37 -1
- homeassistant/components/input_number/translations/ga.json +23 -1
- homeassistant/components/insteon/translations/ga.json +6 -1
- homeassistant/components/insteon/translations/lt.json +7 -2
- homeassistant/components/insteon/translations/ru.json +1 -0
- homeassistant/components/integration/translations/ga.json +22 -2
- homeassistant/components/intellifire/translations/ga.json +15 -1
- homeassistant/components/ios/translations/ga.json +19 -0
- homeassistant/components/iotawatt/translations/ga.json +15 -0
- homeassistant/components/iperf3/translations/ga.json +2 -1
- homeassistant/components/ipma/translations/ga.json +2 -0
- homeassistant/components/iqvia/translations/ga.json +7 -0
- homeassistant/components/iskra/manifest.json +1 -1
- homeassistant/components/izone/translations/ga.json +7 -1
- homeassistant/components/jellyfin/translations/ga.json +13 -0
- homeassistant/components/justnimbus/translations/ga.json +16 -0
- homeassistant/components/jvc_projector/translations/ga.json +1 -0
- homeassistant/components/kaleidescape/translations/ga.json +3 -0
- homeassistant/components/keba/translations/lt.json +1 -0
- homeassistant/components/keba/translations/ru.json +1 -0
- homeassistant/components/kitchen_sink/translations/ga.json +3 -0
- homeassistant/components/kmtronic/translations/ga.json +22 -0
- homeassistant/components/knx/translations/ga.json +100 -2
- homeassistant/components/knx/translations/lt.json +27 -2
- homeassistant/components/konnected/translations/ga.json +3 -1
- homeassistant/components/kostal_plenticore/translations/ga.json +7 -0
- homeassistant/components/kraken/translations/ga.json +20 -0
- homeassistant/components/kulersky/translations/ga.json +3 -0
- homeassistant/components/lacrosse_view/translations/ga.json +25 -0
- homeassistant/components/lametric/translations/ga.json +1 -0
- homeassistant/components/lametric/translations/lt.json +1 -0
- homeassistant/components/landisgyr_heat_meter/translations/ga.json +15 -0
- homeassistant/components/launch_library/translations/lt.json +7 -0
- homeassistant/components/laundrify/translations/lt.json +2 -1
- homeassistant/components/lawn_mower/translations/ga.json +6 -0
- homeassistant/components/lcn/translations/ga.json +52 -3
- homeassistant/components/lcn/translations/lt.json +4 -0
- homeassistant/components/lcn/translations/ru.json +1 -0
- homeassistant/components/leaone/translations/lt.json +2 -1
- homeassistant/components/leaone/translations/ru.json +2 -1
- homeassistant/components/lg_thinq/translations/el.json +3 -0
- homeassistant/components/lg_thinq/translations/ga.json +5 -0
- homeassistant/components/lg_thinq/translations/lt.json +8 -0
- homeassistant/components/lg_thinq/translations/ru.json +5 -0
- homeassistant/components/lidarr/translations/ga.json +16 -0
- homeassistant/components/lifx/translations/ga.json +1 -0
- homeassistant/components/light/translations/ga.json +132 -1
- homeassistant/components/litterrobot/translations/ga.json +6 -0
- homeassistant/components/litterrobot/translations/sensor.ga.json +14 -1
- homeassistant/components/livisi/translations/ga.json +18 -0
- homeassistant/components/local_calendar/translations/ga.json +5 -2
- homeassistant/components/local_ip/translations/ga.json +9 -0
- homeassistant/components/lookin/translations/ga.json +1 -0
- homeassistant/components/luftdaten/translations/lt.json +7 -0
- homeassistant/components/lutron_caseta/translations/ga.json +34 -1
- homeassistant/components/matter/translations/ga.json +22 -0
- homeassistant/components/matter/translations/lt.json +12 -0
- homeassistant/components/matter/translations/sr-Latn.json +15 -0
- homeassistant/components/matter/translations/sr.json +15 -0
- homeassistant/components/mealie/manifest.json +1 -1
- homeassistant/components/meater/translations/ga.json +9 -0
- homeassistant/components/media_extractor/translations/ga.json +14 -0
- homeassistant/components/media_player/services.yaml +1 -3
- homeassistant/components/media_player/translations/el.json +5 -0
- homeassistant/components/media_player/translations/ga.json +35 -0
- homeassistant/components/media_player/translations/lt.json +2 -1
- homeassistant/components/media_player/translations/ru.json +5 -0
- homeassistant/components/met/translations/ga.json +34 -0
- homeassistant/components/met_eireann/translations/ga.json +15 -0
- homeassistant/components/meteo_france/const.py +1 -1
- homeassistant/components/metoffice/translations/sr-Latn.json +1 -0
- homeassistant/components/metoffice/translations/sr.json +1 -0
- homeassistant/components/miele/climate.py +20 -10
- homeassistant/components/miele/translations/ga.json +2 -1
- homeassistant/components/miele/translations/lt.json +27 -0
- homeassistant/components/mill/translations/ga.json +35 -0
- homeassistant/components/minecraft_server/translations/ga.json +12 -0
- homeassistant/components/minio/translations/ga.json +30 -0
- homeassistant/components/mjpeg/translations/lt.json +1 -0
- homeassistant/components/modbus/entity.py +4 -1
- homeassistant/components/modbus/translations/lt.json +2 -0
- homeassistant/components/modbus/translations/ru.json +2 -0
- homeassistant/components/modern_forms/translations/ga.json +20 -0
- homeassistant/components/moehlenhoff_alpha2/translations/ga.json +7 -0
- homeassistant/components/moon/translations/ga.json +10 -3
- homeassistant/components/moon/translations/sensor.ga.json +14 -0
- homeassistant/components/mopeka/translations/ga.json +12 -2
- homeassistant/components/motion_blinds/translations/ga.json +3 -0
- homeassistant/components/mqtt/translations/ca.json +11 -0
- homeassistant/components/mqtt/translations/el.json +19 -0
- homeassistant/components/mqtt/translations/ga.json +84 -4
- homeassistant/components/mqtt/translations/lt.json +27 -3
- homeassistant/components/mqtt/translations/ru.json +15 -0
- homeassistant/components/music_assistant/media_browser.py +8 -8
- homeassistant/components/music_assistant/translations/lt.json +2 -1
- homeassistant/components/mysensors/translations/ga.json +17 -0
- homeassistant/components/mystrom/translations/ga.json +2 -1
- homeassistant/components/nam/translations/ga.json +26 -0
- homeassistant/components/nest/translations/ga.json +44 -3
- homeassistant/components/nest/translations/lt.json +3 -0
- homeassistant/components/netatmo/translations/ga.json +5 -1
- homeassistant/components/netatmo/translations/sr-Latn.json +16 -0
- homeassistant/components/netatmo/translations/sr.json +16 -0
- homeassistant/components/nexia/translations/ga.json +8 -0
- homeassistant/components/nextcloud/translations/ga.json +14 -0
- homeassistant/components/nextcloud/translations/mk.json +13 -0
- homeassistant/components/nextdns/translations/ga.json +107 -0
- homeassistant/components/nextdns/translations/sr.json +11 -0
- homeassistant/components/nfandroidtv/translations/ga.json +13 -1
- homeassistant/components/nibe_heatpump/translations/ga.json +5 -0
- homeassistant/components/nightscout/translations/ga.json +10 -0
- homeassistant/components/niko_home_control/translations/el.json +10 -1
- homeassistant/components/niko_home_control/translations/ga.json +10 -1
- homeassistant/components/nina/translations/ga.json +38 -2
- homeassistant/components/nissan_leaf/translations/ga.json +7 -0
- homeassistant/components/nobo_hub/translations/ga.json +29 -0
- homeassistant/components/notify/translations/ga.json +7 -1
- homeassistant/components/notion/translations/ga.json +49 -0
- homeassistant/components/nuheat/translations/ga.json +21 -0
- homeassistant/components/number/translations/ga.json +15 -1
- homeassistant/components/nut/translations/ga.json +131 -1
- homeassistant/components/nws/translations/ga.json +11 -0
- homeassistant/components/nws/translations/sr-Latn.json +9 -0
- homeassistant/components/nws/translations/sr.json +9 -0
- homeassistant/components/nx584/translations/ga.json +13 -1
- homeassistant/components/nzbget/translations/ga.json +23 -0
- homeassistant/components/nzbget/translations/lt.json +6 -0
- homeassistant/components/nzbget/translations/ru.json +6 -0
- homeassistant/components/obihai/translations/ga.json +19 -1
- homeassistant/components/octoprint/translations/ga.json +3 -0
- homeassistant/components/ollama/translations/lt.json +10 -0
- homeassistant/components/oncue/translations/ru.json +8 -1
- homeassistant/components/ondilo_ico/translations/ga.json +7 -1
- homeassistant/components/onewire/translations/ga.json +57 -1
- homeassistant/components/onkyo/config_flow.py +1 -1
- homeassistant/components/onvif/translations/ga.json +42 -1
- homeassistant/components/open_meteo/translations/ga.json +15 -0
- homeassistant/components/open_router/translations/lt.json +7 -1
- homeassistant/components/openai_conversation/translations/ga.json +12 -0
- homeassistant/components/openai_conversation/translations/lt.json +5 -0
- homeassistant/components/openhome/translations/ga.json +7 -0
- homeassistant/components/opentherm_gw/translations/ga.json +100 -2
- homeassistant/components/openuv/translations/ga.json +33 -0
- homeassistant/components/openweathermap/translations/ga.json +32 -0
- homeassistant/components/openweathermap/translations/lt.json +2 -1
- homeassistant/components/openweathermap/translations/sr-Latn.json +16 -0
- homeassistant/components/openweathermap/translations/sr.json +16 -0
- homeassistant/components/opower/manifest.json +1 -1
- homeassistant/components/opower/translations/ga.json +11 -2
- homeassistant/components/opower/translations/lt.json +8 -1
- homeassistant/components/overkiz/translations/ga.json +71 -3
- homeassistant/components/overkiz/translations/select.ga.json +1 -0
- homeassistant/components/overkiz/translations/sensor.ga.json +29 -1
- homeassistant/components/ovo_energy/translations/ga.json +14 -1
- homeassistant/components/p1_monitor/translations/ga.json +22 -0
- homeassistant/components/panasonic_viera/translations/ga.json +30 -0
- homeassistant/components/peco/translations/ga.json +2 -0
- homeassistant/components/pegel_online/translations/ga.json +18 -0
- homeassistant/components/person/translations/ga.json +15 -0
- homeassistant/components/pi_hole/translations/ga.json +29 -0
- homeassistant/components/picnic/translations/ga.json +41 -0
- homeassistant/components/plaato/translations/ga.json +13 -0
- homeassistant/components/plant/translations/ga.json +12 -0
- homeassistant/components/playstation_network/translations/ca.json +7 -0
- homeassistant/components/playstation_network/translations/cs.json +6 -0
- homeassistant/components/playstation_network/translations/de.json +6 -0
- homeassistant/components/playstation_network/translations/el.json +54 -0
- homeassistant/components/playstation_network/translations/en-GB.json +6 -0
- homeassistant/components/playstation_network/translations/en.json +6 -0
- homeassistant/components/playstation_network/translations/et.json +23 -0
- homeassistant/components/playstation_network/translations/ga.json +6 -0
- homeassistant/components/playstation_network/translations/lt.json +29 -0
- homeassistant/components/playstation_network/translations/pt.json +6 -0
- homeassistant/components/playstation_network/translations/sk.json +23 -0
- homeassistant/components/playstation_network/translations/zh-Hans.json +23 -0
- homeassistant/components/playstation_network/translations/zh-Hant.json +6 -0
- homeassistant/components/plex/translations/ga.json +40 -0
- homeassistant/components/plugwise/translations/ga.json +105 -0
- homeassistant/components/plugwise/translations/select.ga.json +17 -0
- homeassistant/components/plum_lightpad/translations/ga.json +18 -0
- homeassistant/components/point/translations/ga.json +4 -0
- homeassistant/components/pooldose/entity.py +1 -4
- homeassistant/components/pooldose/manifest.json +1 -1
- homeassistant/components/pooldose/quality_scale.yaml +13 -27
- homeassistant/components/pooldose/translations/ca.json +56 -0
- homeassistant/components/pooldose/translations/el.json +48 -0
- homeassistant/components/pooldose/translations/ga.json +32 -0
- homeassistant/components/poolsense/translations/ga.json +16 -0
- homeassistant/components/powerwall/translations/ga.json +35 -0
- homeassistant/components/profiler/translations/ga.json +11 -0
- homeassistant/components/progettihwsw/translations/ga.json +24 -1
- homeassistant/components/prosegur/translations/ga.json +39 -0
- homeassistant/components/prusalink/translations/sensor.ga.json +7 -0
- homeassistant/components/ps4/translations/ga.json +40 -0
- homeassistant/components/pure_energie/translations/ga.json +39 -0
- homeassistant/components/purpleair/manifest.json +1 -1
- homeassistant/components/purpleair/translations/ga.json +42 -0
- homeassistant/components/pushbullet/translations/ga.json +44 -0
- homeassistant/components/pushover/translations/ga.json +28 -0
- homeassistant/components/pvoutput/translations/ga.json +46 -0
- homeassistant/components/pvpc_hourly_pricing/translations/ga.json +1 -0
- homeassistant/components/qnap/translations/lt.json +1 -0
- homeassistant/components/radarr/translations/ga.json +40 -0
- homeassistant/components/radio_browser/translations/ga.json +9 -0
- homeassistant/components/radiotherm/translations/ga.json +23 -0
- homeassistant/components/rainbird/translations/ga.json +18 -2
- homeassistant/components/rainbird/translations/lt.json +4 -0
- homeassistant/components/rainbird/translations/ru.json +4 -0
- homeassistant/components/rainmachine/translations/ga.json +99 -4
- homeassistant/components/rainmachine/translations/sr-Latn.json +55 -0
- homeassistant/components/rainmachine/translations/sr.json +55 -0
- homeassistant/components/random/translations/ga.json +1 -0
- homeassistant/components/random/translations/lt.json +2 -1
- homeassistant/components/rapt_ble/translations/ga.json +21 -0
- homeassistant/components/rdw/translations/ga.json +36 -0
- homeassistant/components/recollect_waste/translations/ga.json +38 -0
- homeassistant/components/recorder/translations/ga.json +11 -0
- homeassistant/components/renault/translations/ga.json +76 -0
- homeassistant/components/reolink/translations/cs.json +14 -14
- homeassistant/components/reolink/translations/ga.json +47 -5
- homeassistant/components/reolink/translations/lt.json +9 -0
- homeassistant/components/rfxtrx/translations/ga.json +30 -0
- homeassistant/components/risco/translations/lt.json +8 -0
- homeassistant/components/samsungtv/translations/lt.json +1 -0
- homeassistant/components/scrape/translations/lt.json +2 -1
- homeassistant/components/sensibo/translations/ga.json +4 -2
- homeassistant/components/sensibo/translations/lt.json +27 -0
- homeassistant/components/sensibo/translations/sensor.ga.json +7 -0
- homeassistant/components/sensor/translations/ga.json +3 -0
- homeassistant/components/sensor/translations/lt.json +5 -0
- homeassistant/components/shopping_list/translations/sr-Latn.json +11 -0
- homeassistant/components/shopping_list/translations/sr.json +11 -0
- homeassistant/components/sleepiq/translations/lt.json +1 -0
- homeassistant/components/smartthings/translations/ru.json +9 -0
- homeassistant/components/somfy_mylink/translations/lt.json +4 -2
- homeassistant/components/sonos/translations/lt.json +3 -0
- homeassistant/components/sql/translations/lt.json +2 -1
- homeassistant/components/switchbot/translations/lt.json +3 -1
- homeassistant/components/tado/translations/sr-Latn.json +9 -0
- homeassistant/components/tado/translations/sr.json +9 -0
- homeassistant/components/tellduslive/translations/lt.json +4 -0
- homeassistant/components/tellduslive/translations/ru.json +4 -0
- homeassistant/components/template/translations/el.json +50 -0
- homeassistant/components/template/translations/ga.json +1 -0
- homeassistant/components/template/translations/lt.json +138 -27
- homeassistant/components/template/translations/ru.json +8 -0
- homeassistant/components/template/translations/sv.json +31 -8
- homeassistant/components/tesla_fleet/__init__.py +0 -1
- homeassistant/components/teslemetry/translations/lt.json +5 -0
- homeassistant/components/teslemetry/translations/mk.json +5 -0
- homeassistant/components/togrill/translations/lt.json +19 -0
- homeassistant/components/tomorrowio/translations/lt.json +5 -1
- homeassistant/components/tplink/translations/lt.json +6 -2
- homeassistant/components/trafikverket_weatherstation/translations/sr-Latn.json +29 -0
- homeassistant/components/trafikverket_weatherstation/translations/sr.json +29 -0
- homeassistant/components/triggercmd/__init__.py +6 -2
- homeassistant/components/triggercmd/config_flow.py +3 -1
- homeassistant/components/triggercmd/manifest.json +1 -1
- homeassistant/components/triggercmd/switch.py +1 -0
- homeassistant/components/tuya/translations/ga.json +8 -0
- homeassistant/components/tuya/translations/lt.json +6 -2
- homeassistant/components/tuya/translations/select.ga.json +4 -0
- homeassistant/components/unifiprotect/translations/ga.json +8 -0
- homeassistant/components/unifiprotect/translations/lt.json +9 -1
- homeassistant/components/vallox/translations/lt.json +5 -0
- homeassistant/components/volvo/translations/lt.json +45 -1
- homeassistant/components/waze_travel_time/translations/lt.json +10 -0
- homeassistant/components/waze_travel_time/translations/nl.json +3 -0
- homeassistant/components/weather/translations/ga.json +3 -0
- homeassistant/components/weather/translations/sr-Latn.json +24 -7
- homeassistant/components/weather/translations/sr.json +81 -0
- homeassistant/components/weatherflow_cloud/translations/sr-Latn.json +18 -0
- homeassistant/components/weatherflow_cloud/translations/sr.json +18 -0
- homeassistant/components/webostv/translations/lt.json +11 -4
- homeassistant/components/webostv/translations/ru.json +9 -2
- homeassistant/components/websocket_api/http.py +13 -2
- homeassistant/components/whois/translations/lt.json +1 -0
- homeassistant/components/xiaomi_ble/translations/lt.json +2 -1
- homeassistant/components/xiaomi_miio/translations/lt.json +3 -0
- homeassistant/components/yalexs_ble/__init__.py +37 -7
- homeassistant/components/yalexs_ble/config_cache.py +31 -0
- homeassistant/components/yalexs_ble/config_flow.py +80 -35
- homeassistant/components/yalexs_ble/strings.json +10 -5
- homeassistant/components/yalexs_ble/translations/bg.json +1 -7
- homeassistant/components/yalexs_ble/translations/ca.json +2 -12
- homeassistant/components/yalexs_ble/translations/cs.json +10 -5
- homeassistant/components/yalexs_ble/translations/de.json +10 -5
- homeassistant/components/yalexs_ble/translations/el.json +10 -9
- homeassistant/components/yalexs_ble/translations/en-GB.json +9 -4
- homeassistant/components/yalexs_ble/translations/en.json +10 -5
- homeassistant/components/yalexs_ble/translations/es.json +2 -12
- homeassistant/components/yalexs_ble/translations/et.json +10 -5
- homeassistant/components/yalexs_ble/translations/fi.json +2 -12
- homeassistant/components/yalexs_ble/translations/fr.json +1 -2
- homeassistant/components/yalexs_ble/translations/hu.json +2 -12
- homeassistant/components/yalexs_ble/translations/id.json +2 -12
- homeassistant/components/yalexs_ble/translations/it.json +2 -12
- homeassistant/components/yalexs_ble/translations/ja.json +2 -12
- homeassistant/components/yalexs_ble/translations/ko.json +2 -12
- homeassistant/components/yalexs_ble/translations/lt.json +12 -7
- homeassistant/components/yalexs_ble/translations/lv.json +1 -7
- homeassistant/components/yalexs_ble/translations/nb.json +2 -12
- homeassistant/components/yalexs_ble/translations/nl.json +2 -12
- homeassistant/components/yalexs_ble/translations/pl.json +2 -12
- homeassistant/components/yalexs_ble/translations/pt-BR.json +2 -12
- homeassistant/components/yalexs_ble/translations/pt.json +10 -5
- homeassistant/components/yalexs_ble/translations/ro.json +2 -12
- homeassistant/components/yalexs_ble/translations/ru.json +2 -12
- homeassistant/components/yalexs_ble/translations/sk.json +10 -5
- homeassistant/components/yalexs_ble/translations/sv.json +2 -12
- homeassistant/components/yalexs_ble/translations/tr.json +2 -12
- homeassistant/components/yalexs_ble/translations/uk.json +2 -12
- homeassistant/components/yalexs_ble/translations/vi.json +0 -9
- homeassistant/components/yalexs_ble/translations/zh-Hans.json +2 -12
- homeassistant/components/yalexs_ble/translations/zh-Hant.json +10 -5
- homeassistant/components/yolink/translations/lt.json +13 -0
- homeassistant/components/zha/translations/lt.json +6 -0
- homeassistant/components/zwave_js/translations/lt.json +2 -0
- homeassistant/components/zwave_js/translations/ru.json +3 -1
- homeassistant/const.py +1 -1
- homeassistant/generated/config_flows.py +0 -1
- homeassistant/generated/integrations.json +6 -6
- homeassistant/package_constraints.txt +4 -4
- {homeassistant-2025.9.0b1.dist-info → homeassistant-2025.9.0b3.dist-info}/METADATA +1 -1
- {homeassistant-2025.9.0b1.dist-info → homeassistant-2025.9.0b3.dist-info}/RECORD +619 -595
- homeassistant/components/vulcan/__init__.py +0 -48
- homeassistant/components/vulcan/calendar.py +0 -176
- homeassistant/components/vulcan/config_flow.py +0 -327
- homeassistant/components/vulcan/const.py +0 -3
- homeassistant/components/vulcan/fetch_data.py +0 -98
- homeassistant/components/vulcan/manifest.json +0 -9
- homeassistant/components/vulcan/register.py +0 -12
- homeassistant/components/vulcan/strings.json +0 -62
- homeassistant/components/vulcan/translations/bg.json +0 -37
- homeassistant/components/vulcan/translations/ca.json +0 -59
- homeassistant/components/vulcan/translations/cs.json +0 -62
- homeassistant/components/vulcan/translations/de.json +0 -62
- homeassistant/components/vulcan/translations/el.json +0 -61
- homeassistant/components/vulcan/translations/en-GB.json +0 -62
- homeassistant/components/vulcan/translations/en.json +0 -62
- homeassistant/components/vulcan/translations/es.json +0 -62
- homeassistant/components/vulcan/translations/et.json +0 -62
- homeassistant/components/vulcan/translations/fi.json +0 -59
- homeassistant/components/vulcan/translations/fr.json +0 -61
- homeassistant/components/vulcan/translations/ga.json +0 -9
- homeassistant/components/vulcan/translations/gl.json +0 -7
- homeassistant/components/vulcan/translations/he.json +0 -29
- homeassistant/components/vulcan/translations/hu.json +0 -62
- homeassistant/components/vulcan/translations/id.json +0 -59
- homeassistant/components/vulcan/translations/it.json +0 -60
- homeassistant/components/vulcan/translations/ja.json +0 -62
- homeassistant/components/vulcan/translations/ko.json +0 -59
- homeassistant/components/vulcan/translations/lt.json +0 -62
- homeassistant/components/vulcan/translations/mk.json +0 -11
- homeassistant/components/vulcan/translations/nb.json +0 -59
- homeassistant/components/vulcan/translations/nl.json +0 -60
- homeassistant/components/vulcan/translations/pl.json +0 -57
- homeassistant/components/vulcan/translations/pt-BR.json +0 -58
- homeassistant/components/vulcan/translations/pt.json +0 -62
- homeassistant/components/vulcan/translations/ro.json +0 -45
- homeassistant/components/vulcan/translations/ru.json +0 -62
- homeassistant/components/vulcan/translations/sk.json +0 -62
- homeassistant/components/vulcan/translations/sl.json +0 -21
- homeassistant/components/vulcan/translations/sv.json +0 -62
- homeassistant/components/vulcan/translations/tr.json +0 -62
- homeassistant/components/vulcan/translations/uk.json +0 -52
- homeassistant/components/vulcan/translations/vi.json +0 -15
- homeassistant/components/vulcan/translations/zh-Hans.json +0 -62
- homeassistant/components/vulcan/translations/zh-Hant.json +0 -62
- {homeassistant-2025.9.0b1.dist-info → homeassistant-2025.9.0b3.dist-info}/WHEEL +0 -0
- {homeassistant-2025.9.0b1.dist-info → homeassistant-2025.9.0b3.dist-info}/entry_points.txt +0 -0
- {homeassistant-2025.9.0b1.dist-info → homeassistant-2025.9.0b3.dist-info}/licenses/LICENSE.md +0 -0
- {homeassistant-2025.9.0b1.dist-info → homeassistant-2025.9.0b3.dist-info}/licenses/homeassistant/backports/LICENSE.Python +0 -0
- {homeassistant-2025.9.0b1.dist-info → homeassistant-2025.9.0b3.dist-info}/top_level.txt +0 -0
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"""The Vulcan component."""
|
|
2
|
-
|
|
3
|
-
from aiohttp import ClientConnectorError
|
|
4
|
-
from vulcan import Account, Keystore, UnauthorizedCertificateException, Vulcan
|
|
5
|
-
|
|
6
|
-
from homeassistant.config_entries import ConfigEntry
|
|
7
|
-
from homeassistant.const import Platform
|
|
8
|
-
from homeassistant.core import HomeAssistant
|
|
9
|
-
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
|
10
|
-
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
|
11
|
-
|
|
12
|
-
from .const import DOMAIN
|
|
13
|
-
|
|
14
|
-
PLATFORMS = [Platform.CALENDAR]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|
18
|
-
"""Set up Uonet+ Vulcan integration."""
|
|
19
|
-
hass.data.setdefault(DOMAIN, {})
|
|
20
|
-
try:
|
|
21
|
-
keystore = Keystore.load(entry.data["keystore"])
|
|
22
|
-
account = Account.load(entry.data["account"])
|
|
23
|
-
client = Vulcan(keystore, account, async_get_clientsession(hass))
|
|
24
|
-
await client.select_student()
|
|
25
|
-
students = await client.get_students()
|
|
26
|
-
for student in students:
|
|
27
|
-
if str(student.pupil.id) == str(entry.data["student_id"]):
|
|
28
|
-
client.student = student
|
|
29
|
-
break
|
|
30
|
-
except UnauthorizedCertificateException as err:
|
|
31
|
-
raise ConfigEntryAuthFailed("The certificate is not authorized.") from err
|
|
32
|
-
except ClientConnectorError as err:
|
|
33
|
-
raise ConfigEntryNotReady(
|
|
34
|
-
f"Connection error - please check your internet connection: {err}"
|
|
35
|
-
) from err
|
|
36
|
-
hass.data[DOMAIN][entry.entry_id] = client
|
|
37
|
-
|
|
38
|
-
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
|
39
|
-
|
|
40
|
-
return True
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|
44
|
-
"""Unload a config entry."""
|
|
45
|
-
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
|
|
46
|
-
hass.data[DOMAIN].pop(entry.entry_id)
|
|
47
|
-
|
|
48
|
-
return unload_ok
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
"""Support for Vulcan Calendar platform."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from datetime import date, datetime, timedelta
|
|
6
|
-
import logging
|
|
7
|
-
from typing import cast
|
|
8
|
-
from zoneinfo import ZoneInfo
|
|
9
|
-
|
|
10
|
-
from aiohttp import ClientConnectorError
|
|
11
|
-
from vulcan import UnauthorizedCertificateException
|
|
12
|
-
|
|
13
|
-
from homeassistant.components.calendar import (
|
|
14
|
-
ENTITY_ID_FORMAT,
|
|
15
|
-
CalendarEntity,
|
|
16
|
-
CalendarEvent,
|
|
17
|
-
)
|
|
18
|
-
from homeassistant.config_entries import ConfigEntry
|
|
19
|
-
from homeassistant.core import HomeAssistant
|
|
20
|
-
from homeassistant.exceptions import ConfigEntryAuthFailed
|
|
21
|
-
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
|
|
22
|
-
from homeassistant.helpers.entity import generate_entity_id
|
|
23
|
-
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
|
24
|
-
|
|
25
|
-
from . import DOMAIN
|
|
26
|
-
from .fetch_data import get_lessons, get_student_info
|
|
27
|
-
|
|
28
|
-
_LOGGER = logging.getLogger(__name__)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
async def async_setup_entry(
|
|
32
|
-
hass: HomeAssistant,
|
|
33
|
-
config_entry: ConfigEntry,
|
|
34
|
-
async_add_entities: AddConfigEntryEntitiesCallback,
|
|
35
|
-
) -> None:
|
|
36
|
-
"""Set up the calendar platform for entity."""
|
|
37
|
-
client = hass.data[DOMAIN][config_entry.entry_id]
|
|
38
|
-
data = {
|
|
39
|
-
"student_info": await get_student_info(
|
|
40
|
-
client, config_entry.data.get("student_id")
|
|
41
|
-
),
|
|
42
|
-
}
|
|
43
|
-
async_add_entities(
|
|
44
|
-
[
|
|
45
|
-
VulcanCalendarEntity(
|
|
46
|
-
client,
|
|
47
|
-
data,
|
|
48
|
-
generate_entity_id(
|
|
49
|
-
ENTITY_ID_FORMAT,
|
|
50
|
-
f"vulcan_calendar_{data['student_info']['full_name']}",
|
|
51
|
-
hass=hass,
|
|
52
|
-
),
|
|
53
|
-
)
|
|
54
|
-
],
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
class VulcanCalendarEntity(CalendarEntity):
|
|
59
|
-
"""A calendar entity."""
|
|
60
|
-
|
|
61
|
-
_attr_has_entity_name = True
|
|
62
|
-
_attr_translation_key = "calendar"
|
|
63
|
-
|
|
64
|
-
def __init__(self, client, data, entity_id) -> None:
|
|
65
|
-
"""Create the Calendar entity."""
|
|
66
|
-
self._event: CalendarEvent | None = None
|
|
67
|
-
self.client = client
|
|
68
|
-
self.entity_id = entity_id
|
|
69
|
-
student_info = data["student_info"]
|
|
70
|
-
self._attr_unique_id = f"vulcan_calendar_{student_info['id']}"
|
|
71
|
-
self._attr_device_info = DeviceInfo(
|
|
72
|
-
identifiers={(DOMAIN, f"calendar_{student_info['id']}")},
|
|
73
|
-
entry_type=DeviceEntryType.SERVICE,
|
|
74
|
-
name=cast(str, student_info["full_name"]),
|
|
75
|
-
model=(
|
|
76
|
-
f"{student_info['full_name']} -"
|
|
77
|
-
f" {student_info['class']} {student_info['school']}"
|
|
78
|
-
),
|
|
79
|
-
manufacturer="Uonet +",
|
|
80
|
-
configuration_url=(
|
|
81
|
-
f"https://uonetplus.vulcan.net.pl/{student_info['symbol']}"
|
|
82
|
-
),
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
@property
|
|
86
|
-
def event(self) -> CalendarEvent | None:
|
|
87
|
-
"""Return the next upcoming event."""
|
|
88
|
-
return self._event
|
|
89
|
-
|
|
90
|
-
async def async_get_events(
|
|
91
|
-
self, hass: HomeAssistant, start_date: datetime, end_date: datetime
|
|
92
|
-
) -> list[CalendarEvent]:
|
|
93
|
-
"""Get all events in a specific time frame."""
|
|
94
|
-
try:
|
|
95
|
-
events = await get_lessons(
|
|
96
|
-
self.client,
|
|
97
|
-
date_from=start_date,
|
|
98
|
-
date_to=end_date,
|
|
99
|
-
)
|
|
100
|
-
except UnauthorizedCertificateException as err:
|
|
101
|
-
raise ConfigEntryAuthFailed(
|
|
102
|
-
"The certificate is not authorized, please authorize integration again"
|
|
103
|
-
) from err
|
|
104
|
-
except ClientConnectorError as err:
|
|
105
|
-
if self.available:
|
|
106
|
-
_LOGGER.warning(
|
|
107
|
-
"Connection error - please check your internet connection: %s", err
|
|
108
|
-
)
|
|
109
|
-
events = []
|
|
110
|
-
|
|
111
|
-
event_list = []
|
|
112
|
-
for item in events:
|
|
113
|
-
event = CalendarEvent(
|
|
114
|
-
start=datetime.combine(
|
|
115
|
-
item["date"], item["time"].from_, ZoneInfo("Europe/Warsaw")
|
|
116
|
-
),
|
|
117
|
-
end=datetime.combine(
|
|
118
|
-
item["date"], item["time"].to, ZoneInfo("Europe/Warsaw")
|
|
119
|
-
),
|
|
120
|
-
summary=item["lesson"],
|
|
121
|
-
location=item["room"],
|
|
122
|
-
description=item["teacher"],
|
|
123
|
-
)
|
|
124
|
-
|
|
125
|
-
event_list.append(event)
|
|
126
|
-
|
|
127
|
-
return event_list
|
|
128
|
-
|
|
129
|
-
async def async_update(self) -> None:
|
|
130
|
-
"""Get the latest data."""
|
|
131
|
-
|
|
132
|
-
try:
|
|
133
|
-
events = await get_lessons(self.client)
|
|
134
|
-
|
|
135
|
-
if not self.available:
|
|
136
|
-
_LOGGER.warning("Restored connection with API")
|
|
137
|
-
self._attr_available = True
|
|
138
|
-
|
|
139
|
-
if events == []:
|
|
140
|
-
events = await get_lessons(
|
|
141
|
-
self.client,
|
|
142
|
-
date_to=date.today() + timedelta(days=7),
|
|
143
|
-
)
|
|
144
|
-
if events == []:
|
|
145
|
-
self._event = None
|
|
146
|
-
return
|
|
147
|
-
except UnauthorizedCertificateException as err:
|
|
148
|
-
raise ConfigEntryAuthFailed(
|
|
149
|
-
"The certificate is not authorized, please authorize integration again"
|
|
150
|
-
) from err
|
|
151
|
-
except ClientConnectorError as err:
|
|
152
|
-
if self.available:
|
|
153
|
-
_LOGGER.warning(
|
|
154
|
-
"Connection error - please check your internet connection: %s", err
|
|
155
|
-
)
|
|
156
|
-
self._attr_available = False
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
-
new_event = min(
|
|
160
|
-
events,
|
|
161
|
-
key=lambda d: (
|
|
162
|
-
datetime.combine(d["date"], d["time"].to) < datetime.now(),
|
|
163
|
-
abs(datetime.combine(d["date"], d["time"].to) - datetime.now()),
|
|
164
|
-
),
|
|
165
|
-
)
|
|
166
|
-
self._event = CalendarEvent(
|
|
167
|
-
start=datetime.combine(
|
|
168
|
-
new_event["date"], new_event["time"].from_, ZoneInfo("Europe/Warsaw")
|
|
169
|
-
),
|
|
170
|
-
end=datetime.combine(
|
|
171
|
-
new_event["date"], new_event["time"].to, ZoneInfo("Europe/Warsaw")
|
|
172
|
-
),
|
|
173
|
-
summary=new_event["lesson"],
|
|
174
|
-
location=new_event["room"],
|
|
175
|
-
description=new_event["teacher"],
|
|
176
|
-
)
|
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
"""Adds config flow for Vulcan."""
|
|
2
|
-
|
|
3
|
-
from collections.abc import Mapping
|
|
4
|
-
import logging
|
|
5
|
-
from typing import TYPE_CHECKING, Any
|
|
6
|
-
|
|
7
|
-
from aiohttp import ClientConnectionError
|
|
8
|
-
import voluptuous as vol
|
|
9
|
-
from vulcan import (
|
|
10
|
-
Account,
|
|
11
|
-
ExpiredTokenException,
|
|
12
|
-
InvalidPINException,
|
|
13
|
-
InvalidSymbolException,
|
|
14
|
-
InvalidTokenException,
|
|
15
|
-
Keystore,
|
|
16
|
-
UnauthorizedCertificateException,
|
|
17
|
-
Vulcan,
|
|
18
|
-
)
|
|
19
|
-
from vulcan.model import Student
|
|
20
|
-
|
|
21
|
-
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
|
22
|
-
from homeassistant.const import CONF_PIN, CONF_REGION, CONF_TOKEN
|
|
23
|
-
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
|
24
|
-
|
|
25
|
-
from . import DOMAIN
|
|
26
|
-
from .register import register
|
|
27
|
-
|
|
28
|
-
_LOGGER = logging.getLogger(__name__)
|
|
29
|
-
|
|
30
|
-
LOGIN_SCHEMA = {
|
|
31
|
-
vol.Required(CONF_TOKEN): str,
|
|
32
|
-
vol.Required(CONF_REGION): str,
|
|
33
|
-
vol.Required(CONF_PIN): str,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class VulcanFlowHandler(ConfigFlow, domain=DOMAIN):
|
|
38
|
-
"""Handle a Uonet+ Vulcan config flow."""
|
|
39
|
-
|
|
40
|
-
VERSION = 1
|
|
41
|
-
|
|
42
|
-
account: Account
|
|
43
|
-
keystore: Keystore
|
|
44
|
-
|
|
45
|
-
def __init__(self) -> None:
|
|
46
|
-
"""Initialize config flow."""
|
|
47
|
-
self.students: list[Student] | None = None
|
|
48
|
-
|
|
49
|
-
async def async_step_user(
|
|
50
|
-
self, user_input: dict[str, Any] | None = None
|
|
51
|
-
) -> ConfigFlowResult:
|
|
52
|
-
"""Handle config flow."""
|
|
53
|
-
if self._async_current_entries():
|
|
54
|
-
return await self.async_step_add_next_config_entry()
|
|
55
|
-
|
|
56
|
-
return await self.async_step_auth()
|
|
57
|
-
|
|
58
|
-
async def async_step_auth(
|
|
59
|
-
self,
|
|
60
|
-
user_input: dict[str, str] | None = None,
|
|
61
|
-
errors: dict[str, str] | None = None,
|
|
62
|
-
) -> ConfigFlowResult:
|
|
63
|
-
"""Authorize integration."""
|
|
64
|
-
|
|
65
|
-
if user_input is not None:
|
|
66
|
-
try:
|
|
67
|
-
credentials = await register(
|
|
68
|
-
user_input[CONF_TOKEN],
|
|
69
|
-
user_input[CONF_REGION],
|
|
70
|
-
user_input[CONF_PIN],
|
|
71
|
-
)
|
|
72
|
-
except InvalidSymbolException:
|
|
73
|
-
errors = {"base": "invalid_symbol"}
|
|
74
|
-
except InvalidTokenException:
|
|
75
|
-
errors = {"base": "invalid_token"}
|
|
76
|
-
except InvalidPINException:
|
|
77
|
-
errors = {"base": "invalid_pin"}
|
|
78
|
-
except ExpiredTokenException:
|
|
79
|
-
errors = {"base": "expired_token"}
|
|
80
|
-
except ClientConnectionError as err:
|
|
81
|
-
errors = {"base": "cannot_connect"}
|
|
82
|
-
_LOGGER.error("Connection error: %s", err)
|
|
83
|
-
except Exception:
|
|
84
|
-
_LOGGER.exception("Unexpected exception")
|
|
85
|
-
errors = {"base": "unknown"}
|
|
86
|
-
if not errors:
|
|
87
|
-
account = credentials["account"]
|
|
88
|
-
keystore = credentials["keystore"]
|
|
89
|
-
client = Vulcan(keystore, account, async_get_clientsession(self.hass))
|
|
90
|
-
students = await client.get_students()
|
|
91
|
-
|
|
92
|
-
if len(students) > 1:
|
|
93
|
-
self.account = account
|
|
94
|
-
self.keystore = keystore
|
|
95
|
-
self.students = students
|
|
96
|
-
return await self.async_step_select_student()
|
|
97
|
-
student = students[0]
|
|
98
|
-
await self.async_set_unique_id(str(student.pupil.id))
|
|
99
|
-
self._abort_if_unique_id_configured()
|
|
100
|
-
return self.async_create_entry(
|
|
101
|
-
title=f"{student.pupil.first_name} {student.pupil.last_name}",
|
|
102
|
-
data={
|
|
103
|
-
"student_id": str(student.pupil.id),
|
|
104
|
-
"keystore": keystore.as_dict,
|
|
105
|
-
"account": account.as_dict,
|
|
106
|
-
},
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
return self.async_show_form(
|
|
110
|
-
step_id="auth",
|
|
111
|
-
data_schema=vol.Schema(LOGIN_SCHEMA),
|
|
112
|
-
errors=errors,
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
async def async_step_select_student(
|
|
116
|
-
self, user_input: dict[str, str] | None = None
|
|
117
|
-
) -> ConfigFlowResult:
|
|
118
|
-
"""Allow user to select student."""
|
|
119
|
-
errors: dict[str, str] = {}
|
|
120
|
-
students: dict[str, str] = {}
|
|
121
|
-
if self.students is not None:
|
|
122
|
-
for student in self.students:
|
|
123
|
-
students[str(student.pupil.id)] = (
|
|
124
|
-
f"{student.pupil.first_name} {student.pupil.last_name}"
|
|
125
|
-
)
|
|
126
|
-
if user_input is not None:
|
|
127
|
-
if TYPE_CHECKING:
|
|
128
|
-
assert self.keystore is not None
|
|
129
|
-
student_id = user_input["student"]
|
|
130
|
-
await self.async_set_unique_id(str(student_id))
|
|
131
|
-
self._abort_if_unique_id_configured()
|
|
132
|
-
return self.async_create_entry(
|
|
133
|
-
title=students[student_id],
|
|
134
|
-
data={
|
|
135
|
-
"student_id": str(student_id),
|
|
136
|
-
"keystore": self.keystore.as_dict,
|
|
137
|
-
"account": self.account.as_dict,
|
|
138
|
-
},
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
return self.async_show_form(
|
|
142
|
-
step_id="select_student",
|
|
143
|
-
data_schema=vol.Schema({vol.Required("student"): vol.In(students)}),
|
|
144
|
-
errors=errors,
|
|
145
|
-
)
|
|
146
|
-
|
|
147
|
-
async def async_step_select_saved_credentials(
|
|
148
|
-
self,
|
|
149
|
-
user_input: dict[str, str] | None = None,
|
|
150
|
-
errors: dict[str, str] | None = None,
|
|
151
|
-
) -> ConfigFlowResult:
|
|
152
|
-
"""Allow user to select saved credentials."""
|
|
153
|
-
|
|
154
|
-
credentials: dict[str, Any] = {}
|
|
155
|
-
for entry in self.hass.config_entries.async_entries(DOMAIN):
|
|
156
|
-
credentials[entry.entry_id] = entry.data["account"]["UserName"]
|
|
157
|
-
|
|
158
|
-
if user_input is not None:
|
|
159
|
-
existing_entry = self.hass.config_entries.async_get_entry(
|
|
160
|
-
user_input["credentials"]
|
|
161
|
-
)
|
|
162
|
-
if TYPE_CHECKING:
|
|
163
|
-
assert existing_entry is not None
|
|
164
|
-
keystore = Keystore.load(existing_entry.data["keystore"])
|
|
165
|
-
account = Account.load(existing_entry.data["account"])
|
|
166
|
-
client = Vulcan(keystore, account, async_get_clientsession(self.hass))
|
|
167
|
-
try:
|
|
168
|
-
students = await client.get_students()
|
|
169
|
-
except UnauthorizedCertificateException:
|
|
170
|
-
return await self.async_step_auth(
|
|
171
|
-
errors={"base": "expired_credentials"}
|
|
172
|
-
)
|
|
173
|
-
except ClientConnectionError as err:
|
|
174
|
-
_LOGGER.error("Connection error: %s", err)
|
|
175
|
-
return await self.async_step_select_saved_credentials(
|
|
176
|
-
errors={"base": "cannot_connect"}
|
|
177
|
-
)
|
|
178
|
-
except Exception:
|
|
179
|
-
_LOGGER.exception("Unexpected exception")
|
|
180
|
-
return await self.async_step_auth(errors={"base": "unknown"})
|
|
181
|
-
if len(students) == 1:
|
|
182
|
-
student = students[0]
|
|
183
|
-
await self.async_set_unique_id(str(student.pupil.id))
|
|
184
|
-
self._abort_if_unique_id_configured()
|
|
185
|
-
return self.async_create_entry(
|
|
186
|
-
title=f"{student.pupil.first_name} {student.pupil.last_name}",
|
|
187
|
-
data={
|
|
188
|
-
"student_id": str(student.pupil.id),
|
|
189
|
-
"keystore": keystore.as_dict,
|
|
190
|
-
"account": account.as_dict,
|
|
191
|
-
},
|
|
192
|
-
)
|
|
193
|
-
self.account = account
|
|
194
|
-
self.keystore = keystore
|
|
195
|
-
self.students = students
|
|
196
|
-
return await self.async_step_select_student()
|
|
197
|
-
|
|
198
|
-
data_schema = {
|
|
199
|
-
vol.Required(
|
|
200
|
-
"credentials",
|
|
201
|
-
): vol.In(credentials),
|
|
202
|
-
}
|
|
203
|
-
return self.async_show_form(
|
|
204
|
-
step_id="select_saved_credentials",
|
|
205
|
-
data_schema=vol.Schema(data_schema),
|
|
206
|
-
errors=errors,
|
|
207
|
-
)
|
|
208
|
-
|
|
209
|
-
async def async_step_add_next_config_entry(
|
|
210
|
-
self, user_input: dict[str, bool] | None = None
|
|
211
|
-
) -> ConfigFlowResult:
|
|
212
|
-
"""Flow initialized when user is adding next entry of that integration."""
|
|
213
|
-
|
|
214
|
-
existing_entries = self.hass.config_entries.async_entries(DOMAIN)
|
|
215
|
-
|
|
216
|
-
errors: dict[str, str] = {}
|
|
217
|
-
|
|
218
|
-
if user_input is not None:
|
|
219
|
-
if not user_input["use_saved_credentials"]:
|
|
220
|
-
return await self.async_step_auth()
|
|
221
|
-
if len(existing_entries) > 1:
|
|
222
|
-
return await self.async_step_select_saved_credentials()
|
|
223
|
-
keystore = Keystore.load(existing_entries[0].data["keystore"])
|
|
224
|
-
account = Account.load(existing_entries[0].data["account"])
|
|
225
|
-
client = Vulcan(keystore, account, async_get_clientsession(self.hass))
|
|
226
|
-
students = await client.get_students()
|
|
227
|
-
existing_entry_ids = [
|
|
228
|
-
entry.data["student_id"] for entry in existing_entries
|
|
229
|
-
]
|
|
230
|
-
new_students = [
|
|
231
|
-
student
|
|
232
|
-
for student in students
|
|
233
|
-
if str(student.pupil.id) not in existing_entry_ids
|
|
234
|
-
]
|
|
235
|
-
if not new_students:
|
|
236
|
-
return self.async_abort(reason="all_student_already_configured")
|
|
237
|
-
if len(new_students) == 1:
|
|
238
|
-
await self.async_set_unique_id(str(new_students[0].pupil.id))
|
|
239
|
-
self._abort_if_unique_id_configured()
|
|
240
|
-
return self.async_create_entry(
|
|
241
|
-
title=(
|
|
242
|
-
f"{new_students[0].pupil.first_name} {new_students[0].pupil.last_name}"
|
|
243
|
-
),
|
|
244
|
-
data={
|
|
245
|
-
"student_id": str(new_students[0].pupil.id),
|
|
246
|
-
"keystore": keystore.as_dict,
|
|
247
|
-
"account": account.as_dict,
|
|
248
|
-
},
|
|
249
|
-
)
|
|
250
|
-
self.account = account
|
|
251
|
-
self.keystore = keystore
|
|
252
|
-
self.students = new_students
|
|
253
|
-
return await self.async_step_select_student()
|
|
254
|
-
|
|
255
|
-
data_schema = {
|
|
256
|
-
vol.Required("use_saved_credentials", default=True): bool,
|
|
257
|
-
}
|
|
258
|
-
return self.async_show_form(
|
|
259
|
-
step_id="add_next_config_entry",
|
|
260
|
-
data_schema=vol.Schema(data_schema),
|
|
261
|
-
errors=errors,
|
|
262
|
-
)
|
|
263
|
-
|
|
264
|
-
async def async_step_reauth(
|
|
265
|
-
self, entry_data: Mapping[str, Any]
|
|
266
|
-
) -> ConfigFlowResult:
|
|
267
|
-
"""Perform reauth upon an API authentication error."""
|
|
268
|
-
return await self.async_step_reauth_confirm()
|
|
269
|
-
|
|
270
|
-
async def async_step_reauth_confirm(
|
|
271
|
-
self, user_input: dict[str, str] | None = None
|
|
272
|
-
) -> ConfigFlowResult:
|
|
273
|
-
"""Reauthorize integration."""
|
|
274
|
-
errors = {}
|
|
275
|
-
if user_input is not None:
|
|
276
|
-
try:
|
|
277
|
-
credentials = await register(
|
|
278
|
-
user_input[CONF_TOKEN],
|
|
279
|
-
user_input[CONF_REGION],
|
|
280
|
-
user_input[CONF_PIN],
|
|
281
|
-
)
|
|
282
|
-
except InvalidSymbolException:
|
|
283
|
-
errors = {"base": "invalid_symbol"}
|
|
284
|
-
except InvalidTokenException:
|
|
285
|
-
errors = {"base": "invalid_token"}
|
|
286
|
-
except InvalidPINException:
|
|
287
|
-
errors = {"base": "invalid_pin"}
|
|
288
|
-
except ExpiredTokenException:
|
|
289
|
-
errors = {"base": "expired_token"}
|
|
290
|
-
except ClientConnectionError as err:
|
|
291
|
-
errors["base"] = "cannot_connect"
|
|
292
|
-
_LOGGER.error("Connection error: %s", err)
|
|
293
|
-
except Exception:
|
|
294
|
-
_LOGGER.exception("Unexpected exception")
|
|
295
|
-
errors["base"] = "unknown"
|
|
296
|
-
if not errors:
|
|
297
|
-
account = credentials["account"]
|
|
298
|
-
keystore = credentials["keystore"]
|
|
299
|
-
client = Vulcan(keystore, account, async_get_clientsession(self.hass))
|
|
300
|
-
students = await client.get_students()
|
|
301
|
-
existing_entries = self.hass.config_entries.async_entries(DOMAIN)
|
|
302
|
-
matching_entries = False
|
|
303
|
-
for student in students:
|
|
304
|
-
for entry in existing_entries:
|
|
305
|
-
if str(student.pupil.id) == str(entry.data["student_id"]):
|
|
306
|
-
self.hass.config_entries.async_update_entry(
|
|
307
|
-
entry,
|
|
308
|
-
title=(
|
|
309
|
-
f"{student.pupil.first_name} {student.pupil.last_name}"
|
|
310
|
-
),
|
|
311
|
-
data={
|
|
312
|
-
"student_id": str(student.pupil.id),
|
|
313
|
-
"keystore": keystore.as_dict,
|
|
314
|
-
"account": account.as_dict,
|
|
315
|
-
},
|
|
316
|
-
)
|
|
317
|
-
await self.hass.config_entries.async_reload(entry.entry_id)
|
|
318
|
-
matching_entries = True
|
|
319
|
-
if not matching_entries:
|
|
320
|
-
return self.async_abort(reason="no_matching_entries")
|
|
321
|
-
return self.async_abort(reason="reauth_successful")
|
|
322
|
-
|
|
323
|
-
return self.async_show_form(
|
|
324
|
-
step_id="reauth_confirm",
|
|
325
|
-
data_schema=vol.Schema(LOGIN_SCHEMA),
|
|
326
|
-
errors=errors,
|
|
327
|
-
)
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"""Support for fetching Vulcan data."""
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
async def get_lessons(client, date_from=None, date_to=None):
|
|
5
|
-
"""Support for fetching Vulcan lessons."""
|
|
6
|
-
changes = {}
|
|
7
|
-
list_ans = []
|
|
8
|
-
async for lesson in await client.data.get_changed_lessons(
|
|
9
|
-
date_from=date_from, date_to=date_to
|
|
10
|
-
):
|
|
11
|
-
temp_dict = {}
|
|
12
|
-
_id = str(lesson.id)
|
|
13
|
-
temp_dict["id"] = lesson.id
|
|
14
|
-
temp_dict["number"] = lesson.time.position if lesson.time is not None else None
|
|
15
|
-
temp_dict["lesson"] = (
|
|
16
|
-
lesson.subject.name if lesson.subject is not None else None
|
|
17
|
-
)
|
|
18
|
-
temp_dict["room"] = lesson.room.code if lesson.room is not None else None
|
|
19
|
-
temp_dict["changes"] = lesson.changes
|
|
20
|
-
temp_dict["note"] = lesson.note
|
|
21
|
-
temp_dict["reason"] = lesson.reason
|
|
22
|
-
temp_dict["event"] = lesson.event
|
|
23
|
-
temp_dict["group"] = lesson.group
|
|
24
|
-
temp_dict["teacher"] = (
|
|
25
|
-
lesson.teacher.display_name if lesson.teacher is not None else None
|
|
26
|
-
)
|
|
27
|
-
temp_dict["from_to"] = (
|
|
28
|
-
lesson.time.displayed_time if lesson.time is not None else None
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
changes[str(_id)] = temp_dict
|
|
32
|
-
|
|
33
|
-
async for lesson in await client.data.get_lessons(
|
|
34
|
-
date_from=date_from, date_to=date_to
|
|
35
|
-
):
|
|
36
|
-
temp_dict = {}
|
|
37
|
-
temp_dict["id"] = lesson.id
|
|
38
|
-
temp_dict["number"] = lesson.time.position
|
|
39
|
-
temp_dict["time"] = lesson.time
|
|
40
|
-
temp_dict["date"] = lesson.date.date
|
|
41
|
-
temp_dict["lesson"] = (
|
|
42
|
-
lesson.subject.name if lesson.subject is not None else None
|
|
43
|
-
)
|
|
44
|
-
if lesson.room is not None:
|
|
45
|
-
temp_dict["room"] = lesson.room.code
|
|
46
|
-
else:
|
|
47
|
-
temp_dict["room"] = "-"
|
|
48
|
-
temp_dict["visible"] = lesson.visible
|
|
49
|
-
temp_dict["changes"] = lesson.changes
|
|
50
|
-
temp_dict["group"] = lesson.group
|
|
51
|
-
temp_dict["reason"] = None
|
|
52
|
-
temp_dict["teacher"] = (
|
|
53
|
-
lesson.teacher.display_name if lesson.teacher is not None else None
|
|
54
|
-
)
|
|
55
|
-
temp_dict["from_to"] = (
|
|
56
|
-
lesson.time.displayed_time if lesson.time is not None else None
|
|
57
|
-
)
|
|
58
|
-
if temp_dict["changes"] is None:
|
|
59
|
-
temp_dict["changes"] = ""
|
|
60
|
-
elif temp_dict["changes"].type == 1:
|
|
61
|
-
temp_dict["lesson"] = f"Lekcja odwołana ({temp_dict['lesson']})"
|
|
62
|
-
temp_dict["changes_info"] = f"Lekcja odwołana ({temp_dict['lesson']})"
|
|
63
|
-
if str(temp_dict["changes"].id) in changes:
|
|
64
|
-
temp_dict["reason"] = changes[str(temp_dict["changes"].id)]["reason"]
|
|
65
|
-
elif temp_dict["changes"].type == 2:
|
|
66
|
-
temp_dict["lesson"] = f"{temp_dict['lesson']} (Zastępstwo)"
|
|
67
|
-
temp_dict["teacher"] = changes[str(temp_dict["changes"].id)]["teacher"]
|
|
68
|
-
if str(temp_dict["changes"].id) in changes:
|
|
69
|
-
temp_dict["teacher"] = changes[str(temp_dict["changes"].id)]["teacher"]
|
|
70
|
-
temp_dict["reason"] = changes[str(temp_dict["changes"].id)]["reason"]
|
|
71
|
-
elif temp_dict["changes"].type == 4:
|
|
72
|
-
temp_dict["lesson"] = f"Lekcja odwołana ({temp_dict['lesson']})"
|
|
73
|
-
if str(temp_dict["changes"].id) in changes:
|
|
74
|
-
temp_dict["reason"] = changes[str(temp_dict["changes"].id)]["reason"]
|
|
75
|
-
if temp_dict["visible"]:
|
|
76
|
-
list_ans.append(temp_dict)
|
|
77
|
-
|
|
78
|
-
return list_ans
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
async def get_student_info(client, student_id):
|
|
82
|
-
"""Support for fetching Student info by student id."""
|
|
83
|
-
student_info = {}
|
|
84
|
-
for student in await client.get_students():
|
|
85
|
-
if str(student.pupil.id) == str(student_id):
|
|
86
|
-
student_info["first_name"] = student.pupil.first_name
|
|
87
|
-
if student.pupil.second_name:
|
|
88
|
-
student_info["second_name"] = student.pupil.second_name
|
|
89
|
-
student_info["last_name"] = student.pupil.last_name
|
|
90
|
-
student_info["full_name"] = (
|
|
91
|
-
f"{student.pupil.first_name} {student.pupil.last_name}"
|
|
92
|
-
)
|
|
93
|
-
student_info["id"] = student.pupil.id
|
|
94
|
-
student_info["class"] = student.class_
|
|
95
|
-
student_info["school"] = student.school.name
|
|
96
|
-
student_info["symbol"] = student.symbol
|
|
97
|
-
break
|
|
98
|
-
return student_info
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"""Support for register Vulcan account."""
|
|
2
|
-
|
|
3
|
-
from typing import Any
|
|
4
|
-
|
|
5
|
-
from vulcan import Account, Keystore
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
async def register(token: str, symbol: str, pin: str) -> dict[str, Any]:
|
|
9
|
-
"""Register integration and save credentials."""
|
|
10
|
-
keystore = await Keystore.create(device_model="Home Assistant")
|
|
11
|
-
account = await Account.register(keystore, token, symbol, pin)
|
|
12
|
-
return {"account": account, "keystore": keystore}
|