meteocat 0.1.23 → 0.1.25

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.
Files changed (35) hide show
  1. package/.github/workflows/release.yml +33 -33
  2. package/.pre-commit-config.yaml +37 -37
  3. package/.releaserc +23 -23
  4. package/.releaserc.toml +14 -14
  5. package/AUTHORS.md +12 -12
  6. package/CHANGELOG.md +401 -381
  7. package/README.md +40 -40
  8. package/custom_components/meteocat/__init__.py +107 -107
  9. package/custom_components/meteocat/condition.py +28 -28
  10. package/custom_components/meteocat/config_flow.py +192 -192
  11. package/custom_components/meteocat/const.py +55 -54
  12. package/custom_components/meteocat/coordinator.py +195 -171
  13. package/custom_components/meteocat/entity.py +98 -98
  14. package/custom_components/meteocat/helpers.py +42 -42
  15. package/custom_components/meteocat/manifest.json +12 -12
  16. package/custom_components/meteocat/options_flow.py +71 -71
  17. package/custom_components/meteocat/sensor.py +303 -200
  18. package/custom_components/meteocat/strings.json +25 -25
  19. package/custom_components/meteocat/translations/ca.json +25 -25
  20. package/custom_components/meteocat/translations/en.json +25 -25
  21. package/custom_components/meteocat/translations/es.json +25 -25
  22. package/custom_components/meteocat/version.py +2 -2
  23. package/filetree.py +48 -48
  24. package/filetree.txt +46 -46
  25. package/hacs.json +5 -5
  26. package/package.json +22 -22
  27. package/poetry.lock +3216 -3216
  28. package/pyproject.toml +64 -64
  29. package/releaserc.json +17 -17
  30. package/requirements.test.txt +3 -3
  31. package/setup.cfg +64 -64
  32. package/setup.py +10 -10
  33. package/tests/bandit.yaml +17 -17
  34. package/tests/conftest.py +19 -19
  35. package/tests/test_init.py +9 -9
@@ -1,26 +1,26 @@
1
- {
2
- "config": {
3
- "step": {
4
- "user": {
5
- "description": "Enter your Meteocat API Key to validate it.",
6
- "title": "API Key"
7
- },
8
- "select_municipi": {
9
- "description": "Select a municipality from the list.",
10
- "title": "Municipality Selection"
11
- },
12
- "select_station": {
13
- "description": "Select a station.",
14
- "title": "Station Selection"
15
- }
16
- },
17
- "error": {
18
- "bad_request": "Invalid request. Please check your API Key.",
19
- "forbidden": "Access denied. Check your API Key permissions.",
20
- "rate_limit_exceeded": "Rate limit exceeded. Please try again later.",
21
- "server_error": "Server error. Please try again later.",
22
- "connection_error": "Connection error. Please check your network.",
23
- "unknown_error": "An unknown error occurred."
24
- }
25
- }
1
+ {
2
+ "config": {
3
+ "step": {
4
+ "user": {
5
+ "description": "Enter your Meteocat API Key to validate it.",
6
+ "title": "API Key"
7
+ },
8
+ "select_municipi": {
9
+ "description": "Select a municipality from the list.",
10
+ "title": "Municipality Selection"
11
+ },
12
+ "select_station": {
13
+ "description": "Select a station.",
14
+ "title": "Station Selection"
15
+ }
16
+ },
17
+ "error": {
18
+ "bad_request": "Invalid request. Please check your API Key.",
19
+ "forbidden": "Access denied. Check your API Key permissions.",
20
+ "rate_limit_exceeded": "Rate limit exceeded. Please try again later.",
21
+ "server_error": "Server error. Please try again later.",
22
+ "connection_error": "Connection error. Please check your network.",
23
+ "unknown_error": "An unknown error occurred."
24
+ }
25
+ }
26
26
  }
@@ -1,26 +1,26 @@
1
- {
2
- "config": {
3
- "step": {
4
- "user": {
5
- "description": "Ingrese la API Key facilitada por Meteocat para poder iniciar el proceso de validación.",
6
- "title": "API Key"
7
- },
8
- "select_municipi": {
9
- "description": "Seleccione el municipio de la lista.",
10
- "title": "Selección de municipio"
11
- },
12
- "select_station": {
13
- "description": "Seleccione la estación de la lista.",
14
- "title": "Selección de estación"
15
- }
16
- },
17
- "error": {
18
- "bad_request": "Petición no válida. Revise su API Key.",
19
- "forbidden": "Acceso denegado. Revise los permisos de su API Key.",
20
- "rate_limit_exceeded": "Exceso del límite de peticiones. Por favor, inténtelo de nuevo más tarde.",
21
- "server_error": "Error del servidor. Inténtelo de nuevo más tarde.",
22
- "connection_error": "Error de conexión. Revise su conexión de red.",
23
- "unknown_error": "Error desconocido."
24
- }
25
- }
1
+ {
2
+ "config": {
3
+ "step": {
4
+ "user": {
5
+ "description": "Ingrese la API Key facilitada por Meteocat para poder iniciar el proceso de validación.",
6
+ "title": "API Key"
7
+ },
8
+ "select_municipi": {
9
+ "description": "Seleccione el municipio de la lista.",
10
+ "title": "Selección de municipio"
11
+ },
12
+ "select_station": {
13
+ "description": "Seleccione la estación de la lista.",
14
+ "title": "Selección de estación"
15
+ }
16
+ },
17
+ "error": {
18
+ "bad_request": "Petición no válida. Revise su API Key.",
19
+ "forbidden": "Acceso denegado. Revise los permisos de su API Key.",
20
+ "rate_limit_exceeded": "Exceso del límite de peticiones. Por favor, inténtelo de nuevo más tarde.",
21
+ "server_error": "Error del servidor. Inténtelo de nuevo más tarde.",
22
+ "connection_error": "Error de conexión. Revise su conexión de red.",
23
+ "unknown_error": "Error desconocido."
24
+ }
25
+ }
26
26
  }
@@ -1,2 +1,2 @@
1
- # version.py
2
- __version__ = "0.1.23"
1
+ # version.py
2
+ __version__ = "0.1.25"
package/filetree.py CHANGED
@@ -1,48 +1,48 @@
1
- import subprocess
2
- import os
3
-
4
- def generate_file_tree():
5
- # Ruta donde se generará el archivo
6
- output_file = 'filetree.txt'
7
-
8
- # Ejecutar el comando git ls-files para obtener los archivos no ignorados
9
- git_command = ['git', 'ls-files']
10
- try:
11
- # Captura de la salida del comando git
12
- git_files = subprocess.check_output(git_command).decode('utf-8').splitlines()
13
-
14
- # Crear una estructura de árbol
15
- tree = {}
16
-
17
- # Construir el árbol de directorios
18
- for file in git_files:
19
- parts = file.split('/') # Separar la ruta del archivo por '/'
20
- current = tree
21
- for part in parts[:-1]: # Recorremos todos los directorios
22
- current = current.setdefault(part, {})
23
- current[parts[-1]] = None # El archivo final se marca como 'None'
24
-
25
- # Función recursiva para imprimir el árbol con la indentación correcta
26
- def print_tree(directory, indent=""):
27
- for name, subdirectory in directory.items():
28
- if subdirectory is None:
29
- # Si es un archivo, lo imprimimos
30
- f.write(f"{indent}├── {name}\n")
31
- else:
32
- # Si es un directorio, lo imprimimos y recursivamente llamamos a print_tree
33
- f.write(f"{indent}└── {name}/\n")
34
- print_tree(subdirectory, indent + " ")
35
-
36
- # Crear el archivo y escribir la estructura del árbol con codificación UTF-8
37
- with open(output_file, 'w', encoding='utf-8') as f:
38
- print_tree(tree)
39
-
40
- print(f"Árbol de directorios generado en: {os.path.abspath(output_file)}")
41
-
42
- except subprocess.CalledProcessError as e:
43
- print(f"Error al ejecutar el comando: {e}")
44
- except Exception as e:
45
- print(f"Ocurrió un error inesperado: {e}")
46
-
47
- if __name__ == "__main__":
48
- generate_file_tree()
1
+ import subprocess
2
+ import os
3
+
4
+ def generate_file_tree():
5
+ # Ruta donde se generará el archivo
6
+ output_file = 'filetree.txt'
7
+
8
+ # Ejecutar el comando git ls-files para obtener los archivos no ignorados
9
+ git_command = ['git', 'ls-files']
10
+ try:
11
+ # Captura de la salida del comando git
12
+ git_files = subprocess.check_output(git_command).decode('utf-8').splitlines()
13
+
14
+ # Crear una estructura de árbol
15
+ tree = {}
16
+
17
+ # Construir el árbol de directorios
18
+ for file in git_files:
19
+ parts = file.split('/') # Separar la ruta del archivo por '/'
20
+ current = tree
21
+ for part in parts[:-1]: # Recorremos todos los directorios
22
+ current = current.setdefault(part, {})
23
+ current[parts[-1]] = None # El archivo final se marca como 'None'
24
+
25
+ # Función recursiva para imprimir el árbol con la indentación correcta
26
+ def print_tree(directory, indent=""):
27
+ for name, subdirectory in directory.items():
28
+ if subdirectory is None:
29
+ # Si es un archivo, lo imprimimos
30
+ f.write(f"{indent}├── {name}\n")
31
+ else:
32
+ # Si es un directorio, lo imprimimos y recursivamente llamamos a print_tree
33
+ f.write(f"{indent}└── {name}/\n")
34
+ print_tree(subdirectory, indent + " ")
35
+
36
+ # Crear el archivo y escribir la estructura del árbol con codificación UTF-8
37
+ with open(output_file, 'w', encoding='utf-8') as f:
38
+ print_tree(tree)
39
+
40
+ print(f"Árbol de directorios generado en: {os.path.abspath(output_file)}")
41
+
42
+ except subprocess.CalledProcessError as e:
43
+ print(f"Error al ejecutar el comando: {e}")
44
+ except Exception as e:
45
+ print(f"Ocurrió un error inesperado: {e}")
46
+
47
+ if __name__ == "__main__":
48
+ generate_file_tree()
package/filetree.txt CHANGED
@@ -1,46 +1,46 @@
1
- └── .github/
2
- └── workflows/
3
- ├── release.yml
4
- ├── .gitignore
5
- ├── .gitlab-ci.yml
6
- ├── .pre-commit-config.yaml
7
- ├── .releaserc
8
- ├── .releaserc.toml
9
- ├── AUTHORS.md
10
- ├── CHANGELOG.md
11
- ├── LICENSE
12
- ├── README.md
13
- └── custom_components/
14
- └── meteocat/
15
- ├── __init__.py
16
- ├── condition.py
17
- ├── config_flow.py
18
- ├── const.py
19
- ├── coordinator.py
20
- ├── entity.py
21
- ├── helpers.py
22
- ├── manifest.json
23
- ├── options_flow.py
24
- ├── sensor.py
25
- ├── strings.json
26
- └── translations/
27
- ├── ca.json
28
- ├── en.json
29
- ├── es.json
30
- ├── version.py
31
- ├── filetree.py
32
- ├── filetree.txt
33
- ├── hacs.json
34
- ├── package-lock.json
35
- ├── package.json
36
- ├── poetry.lock
37
- ├── pyproject.toml
38
- ├── releaserc.json
39
- ├── requirements.test.txt
40
- ├── setup.cfg
41
- ├── setup.py
42
- └── tests/
43
- ├── __init__.py
44
- ├── bandit.yaml
45
- ├── conftest.py
46
- ├── test_init.py
1
+ └── .github/
2
+ └── workflows/
3
+ ├── release.yml
4
+ ├── .gitignore
5
+ ├── .gitlab-ci.yml
6
+ ├── .pre-commit-config.yaml
7
+ ├── .releaserc
8
+ ├── .releaserc.toml
9
+ ├── AUTHORS.md
10
+ ├── CHANGELOG.md
11
+ ├── LICENSE
12
+ ├── README.md
13
+ └── custom_components/
14
+ └── meteocat/
15
+ ├── __init__.py
16
+ ├── condition.py
17
+ ├── config_flow.py
18
+ ├── const.py
19
+ ├── coordinator.py
20
+ ├── entity.py
21
+ ├── helpers.py
22
+ ├── manifest.json
23
+ ├── options_flow.py
24
+ ├── sensor.py
25
+ ├── strings.json
26
+ └── translations/
27
+ ├── ca.json
28
+ ├── en.json
29
+ ├── es.json
30
+ ├── version.py
31
+ ├── filetree.py
32
+ ├── filetree.txt
33
+ ├── hacs.json
34
+ ├── package-lock.json
35
+ ├── package.json
36
+ ├── poetry.lock
37
+ ├── pyproject.toml
38
+ ├── releaserc.json
39
+ ├── requirements.test.txt
40
+ ├── setup.cfg
41
+ ├── setup.py
42
+ └── tests/
43
+ ├── __init__.py
44
+ ├── bandit.yaml
45
+ ├── conftest.py
46
+ ├── test_init.py
package/hacs.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "name": "Meteocat",
3
- "render_readme": true,
4
- "iot_class": "cloud_polling"
5
- }
1
+ {
2
+ "name": "Meteocat",
3
+ "render_readme": true,
4
+ "iot_class": "cloud_polling"
5
+ }
6
6
 
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
- {
2
- "name": "meteocat",
3
- "version": "0.1.23",
4
- "description": "[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\r [![Python version compatibility](https://img.shields.io/pypi/pyversions/meteocat)](https://pypi.org/project/meteocat)\r [![pipeline status](https://gitlab.com/figorr/meteocat/badges/master/pipeline.svg)](https://gitlab.com/figorr/meteocat/commits/master)",
5
- "main": "index.js",
6
- "directories": {
7
- "test": "tests"
8
- },
9
- "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1"
11
- },
12
- "keywords": [],
13
- "author": "",
14
- "license": "ISC",
15
- "devDependencies": {
16
- "@semantic-release/changelog": "^6.0.3",
17
- "@semantic-release/exec": "^6.0.3",
18
- "@semantic-release/git": "^10.0.1",
19
- "@semantic-release/github": "^11.0.1",
20
- "semantic-release": "^24.2.0"
21
- }
22
- }
1
+ {
2
+ "name": "meteocat",
3
+ "version": "0.1.25",
4
+ "description": "[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\r [![Python version compatibility](https://img.shields.io/pypi/pyversions/meteocat)](https://pypi.org/project/meteocat)\r [![pipeline status](https://gitlab.com/figorr/meteocat/badges/master/pipeline.svg)](https://gitlab.com/figorr/meteocat/commits/master)",
5
+ "main": "index.js",
6
+ "directories": {
7
+ "test": "tests"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ },
12
+ "keywords": [],
13
+ "author": "",
14
+ "license": "ISC",
15
+ "devDependencies": {
16
+ "@semantic-release/changelog": "^6.0.3",
17
+ "@semantic-release/exec": "^6.0.3",
18
+ "@semantic-release/git": "^10.0.1",
19
+ "@semantic-release/github": "^11.0.1",
20
+ "semantic-release": "^24.2.0"
21
+ }
22
+ }