anycubic-cloud-frontend 0.1.1__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.
- anycubic_cloud_frontend/__init__.py +26 -0
- anycubic_cloud_frontend/anycubic-card.js +9768 -0
- anycubic_cloud_frontend/constants.py +6 -0
- anycubic_cloud_frontend/entrypoint.067b89d3.js +10125 -0
- anycubic_cloud_frontend-0.1.1.dist-info/METADATA +41 -0
- anycubic_cloud_frontend-0.1.1.dist-info/RECORD +9 -0
- anycubic_cloud_frontend-0.1.1.dist-info/WHEEL +5 -0
- anycubic_cloud_frontend-0.1.1.dist-info/licenses/LICENSE +674 -0
- anycubic_cloud_frontend-0.1.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Anycubic Cloud Frontend.
|
|
2
|
+
|
|
3
|
+
Ships the built sidebar panel for the Home Assistant `anycubic_cloud`
|
|
4
|
+
integration. Home Assistant core does not accept bundled frontend assets
|
|
5
|
+
inside an integration, so the panel lives here instead -- the same approach
|
|
6
|
+
knx-frontend takes for KNX.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from typing import Final
|
|
10
|
+
|
|
11
|
+
from .constants import FILE_HASH
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def locate_dir() -> str:
|
|
15
|
+
"""Return the directory holding the built frontend files."""
|
|
16
|
+
return __path__[0]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Filename of the entrypoint to import the panel.
|
|
20
|
+
entrypoint_js: Final = f"entrypoint.{FILE_HASH}.js"
|
|
21
|
+
|
|
22
|
+
# The web component name that loads the panel.
|
|
23
|
+
webcomponent_name: Final = "anycubic-cloud-panel"
|
|
24
|
+
|
|
25
|
+
is_dev_build: Final = FILE_HASH == "dev"
|
|
26
|
+
is_prod_build: Final = not is_dev_build
|