meteocat 0.1.30 → 0.1.32
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.
- package/CHANGELOG.md +20 -0
- package/custom_components/meteocat/__init__.py +1 -1
- package/custom_components/meteocat/const.py +1 -0
- package/custom_components/meteocat/manifest.json +2 -2
- package/custom_components/meteocat/sensor.py +90 -25
- package/custom_components/meteocat/strings.json +99 -21
- package/custom_components/meteocat/translations/ca.json +78 -1
- package/custom_components/meteocat/translations/en.json +79 -1
- package/custom_components/meteocat/translations/es.json +79 -1
- package/custom_components/meteocat/version.py +1 -1
- package/package.json +1 -1
- package/pyproject.toml +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [0.1.32](https://github.com/figorr/meteocat/compare/v0.1.31...v0.1.32) (2024-12-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* 0.1.32 ([7c6186f](https://github.com/figorr/meteocat/commit/7c6186fe81061013f6093355b042750fbc28b921))
|
|
7
|
+
* add LOGGER debug to FEELS LIKE ([a0cd0c4](https://github.com/figorr/meteocat/commit/a0cd0c495b1f01365a74d6262ed595921962b825))
|
|
8
|
+
* add translations names to sensors ([57a5a1c](https://github.com/figorr/meteocat/commit/57a5a1c734db1042b1085c8fb58140c1dc0ad1fb))
|
|
9
|
+
* add wind direction translations ([f4ec133](https://github.com/figorr/meteocat/commit/f4ec1339126d4da008e0cbc2a96fff8be3c6e081))
|
|
10
|
+
|
|
11
|
+
## [0.1.31](https://github.com/figorr/meteocat/compare/v0.1.30...v0.1.31) (2024-12-13)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* 0.1.31 ([6d49197](https://github.com/figorr/meteocat/commit/6d4919717b09d4e38a3225bf9a33d1400a0227d0))
|
|
17
|
+
* add feels like sensor ([caca7a0](https://github.com/figorr/meteocat/commit/caca7a0d2bc53969db584eda2e2818321f3930fc))
|
|
18
|
+
* add feels like sensor ([ccecfae](https://github.com/figorr/meteocat/commit/ccecfae83f1a2e72a2438cf6a189bf5d5186d6b3))
|
|
19
|
+
* bump meteocatpy to 0.0.15 ([8d08b6f](https://github.com/figorr/meteocat/commit/8d08b6f66ac2ce5b029569a1538d524d3d7f50dc))
|
|
20
|
+
|
|
1
21
|
## [0.1.30](https://github.com/figorr/meteocat/compare/v0.1.29...v0.1.30) (2024-12-12)
|
|
2
22
|
|
|
3
23
|
|
|
@@ -14,7 +14,7 @@ from .const import DOMAIN, PLATFORMS
|
|
|
14
14
|
_LOGGER = logging.getLogger(__name__)
|
|
15
15
|
|
|
16
16
|
# Versión
|
|
17
|
-
__version__ = "0.1.
|
|
17
|
+
__version__ = "0.1.32"
|
|
18
18
|
|
|
19
19
|
def safe_remove(path: Path, is_folder: bool = False):
|
|
20
20
|
"""Elimina de forma segura un archivo o carpeta si existe."""
|
|
@@ -21,6 +21,7 @@ SOLAR_GLOBAL_IRRADIANCE = "solar_global_irradiance" # Irradiación solar global
|
|
|
21
21
|
UV_INDEX = "uv_index" # UV
|
|
22
22
|
MAX_TEMPERATURE = "max_temperature" # Temperatura máxima
|
|
23
23
|
MIN_TEMPERATURE = "min_temperature" # Temperatura mínima
|
|
24
|
+
FEELS_LIKE = "feels_like" # Sensación térmica
|
|
24
25
|
WIND_GUST = "wind_gust" # Racha de viento
|
|
25
26
|
STATION_TIMESTAMP = "station_timestamp" # Código de tiempo de la estación
|
|
26
27
|
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
"iot_class": "cloud_polling",
|
|
8
8
|
"documentation": "https://gitlab.com/figorr/meteocat",
|
|
9
9
|
"loggers": ["meteocatpy"],
|
|
10
|
-
"requirements": ["meteocatpy==0.0.
|
|
11
|
-
"version": "0.1.
|
|
10
|
+
"requirements": ["meteocatpy==0.0.15", "packaging>=20.3", "wrapt>=1.14.0"],
|
|
11
|
+
"version": "0.1.32"
|
|
12
12
|
}
|
|
@@ -55,6 +55,7 @@ from .const import (
|
|
|
55
55
|
UV_INDEX_CODE,
|
|
56
56
|
MAX_TEMPERATURE_CODE,
|
|
57
57
|
MIN_TEMPERATURE_CODE,
|
|
58
|
+
FEELS_LIKE,
|
|
58
59
|
WIND_GUST_CODE,
|
|
59
60
|
)
|
|
60
61
|
|
|
@@ -70,7 +71,7 @@ SENSOR_TYPES: tuple[MeteocatSensorEntityDescription, ...] = (
|
|
|
70
71
|
# Sensores dinámicos
|
|
71
72
|
MeteocatSensorEntityDescription(
|
|
72
73
|
key=WIND_SPEED,
|
|
73
|
-
|
|
74
|
+
translation_key="wind_speed",
|
|
74
75
|
icon="mdi:weather-windy",
|
|
75
76
|
device_class=SensorDeviceClass.WIND_SPEED,
|
|
76
77
|
state_class=SensorStateClass.MEASUREMENT,
|
|
@@ -78,13 +79,13 @@ SENSOR_TYPES: tuple[MeteocatSensorEntityDescription, ...] = (
|
|
|
78
79
|
),
|
|
79
80
|
MeteocatSensorEntityDescription(
|
|
80
81
|
key=WIND_DIRECTION,
|
|
81
|
-
|
|
82
|
+
translation_key="wind_direction",
|
|
82
83
|
icon="mdi:compass",
|
|
83
84
|
device_class=None,
|
|
84
85
|
),
|
|
85
86
|
MeteocatSensorEntityDescription(
|
|
86
87
|
key=TEMPERATURE,
|
|
87
|
-
|
|
88
|
+
translation_key="temperature",
|
|
88
89
|
icon="mdi:thermometer",
|
|
89
90
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
90
91
|
state_class=SensorStateClass.MEASUREMENT,
|
|
@@ -92,7 +93,7 @@ SENSOR_TYPES: tuple[MeteocatSensorEntityDescription, ...] = (
|
|
|
92
93
|
),
|
|
93
94
|
MeteocatSensorEntityDescription(
|
|
94
95
|
key=HUMIDITY,
|
|
95
|
-
|
|
96
|
+
translation_key="humidity",
|
|
96
97
|
icon="mdi:water-percent",
|
|
97
98
|
device_class=SensorDeviceClass.HUMIDITY,
|
|
98
99
|
state_class=SensorStateClass.MEASUREMENT,
|
|
@@ -100,7 +101,7 @@ SENSOR_TYPES: tuple[MeteocatSensorEntityDescription, ...] = (
|
|
|
100
101
|
),
|
|
101
102
|
MeteocatSensorEntityDescription(
|
|
102
103
|
key=PRESSURE,
|
|
103
|
-
|
|
104
|
+
translation_key="pressure",
|
|
104
105
|
icon="mdi:gauge",
|
|
105
106
|
device_class=SensorDeviceClass.ATMOSPHERIC_PRESSURE,
|
|
106
107
|
state_class=SensorStateClass.MEASUREMENT,
|
|
@@ -108,7 +109,7 @@ SENSOR_TYPES: tuple[MeteocatSensorEntityDescription, ...] = (
|
|
|
108
109
|
),
|
|
109
110
|
MeteocatSensorEntityDescription(
|
|
110
111
|
key=PRECIPITATION,
|
|
111
|
-
|
|
112
|
+
translation_key="precipitation",
|
|
112
113
|
icon="mdi:weather-rainy",
|
|
113
114
|
device_class=None,
|
|
114
115
|
state_class=SensorStateClass.MEASUREMENT,
|
|
@@ -116,7 +117,7 @@ SENSOR_TYPES: tuple[MeteocatSensorEntityDescription, ...] = (
|
|
|
116
117
|
),
|
|
117
118
|
MeteocatSensorEntityDescription(
|
|
118
119
|
key=PRECIPITATION_ACCUMULATED,
|
|
119
|
-
|
|
120
|
+
translation_key="precipitation_accumulated",
|
|
120
121
|
icon="mdi:weather-rainy",
|
|
121
122
|
device_class=SensorDeviceClass.PRECIPITATION,
|
|
122
123
|
state_class=SensorStateClass.MEASUREMENT,
|
|
@@ -124,7 +125,7 @@ SENSOR_TYPES: tuple[MeteocatSensorEntityDescription, ...] = (
|
|
|
124
125
|
),
|
|
125
126
|
MeteocatSensorEntityDescription(
|
|
126
127
|
key=SOLAR_GLOBAL_IRRADIANCE,
|
|
127
|
-
|
|
128
|
+
translation_key="solar_global_irradiance",
|
|
128
129
|
icon="mdi:weather-sunny",
|
|
129
130
|
device_class=SensorDeviceClass.IRRADIANCE,
|
|
130
131
|
state_class=SensorStateClass.MEASUREMENT,
|
|
@@ -132,12 +133,12 @@ SENSOR_TYPES: tuple[MeteocatSensorEntityDescription, ...] = (
|
|
|
132
133
|
),
|
|
133
134
|
MeteocatSensorEntityDescription(
|
|
134
135
|
key=UV_INDEX,
|
|
135
|
-
|
|
136
|
+
translation_key="uv_index",
|
|
136
137
|
icon="mdi:weather-sunny",
|
|
137
138
|
),
|
|
138
139
|
MeteocatSensorEntityDescription(
|
|
139
140
|
key=MAX_TEMPERATURE,
|
|
140
|
-
|
|
141
|
+
translation_key="max_temperature",
|
|
141
142
|
icon="mdi:thermometer-plus",
|
|
142
143
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
143
144
|
state_class=SensorStateClass.MEASUREMENT,
|
|
@@ -145,15 +146,23 @@ SENSOR_TYPES: tuple[MeteocatSensorEntityDescription, ...] = (
|
|
|
145
146
|
),
|
|
146
147
|
MeteocatSensorEntityDescription(
|
|
147
148
|
key=MIN_TEMPERATURE,
|
|
148
|
-
|
|
149
|
+
translation_key="min_temperature",
|
|
149
150
|
icon="mdi:thermometer-minus",
|
|
150
151
|
device_class=SensorDeviceClass.TEMPERATURE,
|
|
151
152
|
state_class=SensorStateClass.MEASUREMENT,
|
|
152
153
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
153
154
|
),
|
|
155
|
+
MeteocatSensorEntityDescription(
|
|
156
|
+
key=FEELS_LIKE,
|
|
157
|
+
translation_key="feels_like",
|
|
158
|
+
icon="mdi:sun-thermometer",
|
|
159
|
+
device_class=SensorDeviceClass.TEMPERATURE,
|
|
160
|
+
state_class=SensorStateClass.MEASUREMENT,
|
|
161
|
+
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
|
162
|
+
),
|
|
154
163
|
MeteocatSensorEntityDescription(
|
|
155
164
|
key=WIND_GUST,
|
|
156
|
-
|
|
165
|
+
translation_key="wind_gust",
|
|
157
166
|
icon="mdi:weather-windy",
|
|
158
167
|
device_class=SensorDeviceClass.WIND_SPEED,
|
|
159
168
|
state_class=SensorStateClass.MEASUREMENT,
|
|
@@ -162,31 +171,31 @@ SENSOR_TYPES: tuple[MeteocatSensorEntityDescription, ...] = (
|
|
|
162
171
|
# Sensores estáticos
|
|
163
172
|
MeteocatSensorEntityDescription(
|
|
164
173
|
key=TOWN_NAME,
|
|
165
|
-
|
|
174
|
+
translation_key="town_name",
|
|
166
175
|
icon="mdi:home-city",
|
|
167
176
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
168
177
|
),
|
|
169
178
|
MeteocatSensorEntityDescription(
|
|
170
179
|
key=TOWN_ID,
|
|
171
|
-
|
|
180
|
+
translation_key="town_id",
|
|
172
181
|
icon="mdi:identifier",
|
|
173
182
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
174
183
|
),
|
|
175
184
|
MeteocatSensorEntityDescription(
|
|
176
185
|
key=STATION_NAME,
|
|
177
|
-
|
|
186
|
+
translation_key="station_name",
|
|
178
187
|
icon="mdi:broadcast",
|
|
179
188
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
180
189
|
),
|
|
181
190
|
MeteocatSensorEntityDescription(
|
|
182
191
|
key=STATION_ID,
|
|
183
|
-
|
|
192
|
+
translation_key="station_id",
|
|
184
193
|
icon="mdi:identifier",
|
|
185
194
|
entity_category=EntityCategory.DIAGNOSTIC,
|
|
186
195
|
),
|
|
187
196
|
MeteocatSensorEntityDescription(
|
|
188
197
|
key=STATION_TIMESTAMP,
|
|
189
|
-
|
|
198
|
+
translation_key="station_timestamp",
|
|
190
199
|
icon="mdi:calendar-clock",
|
|
191
200
|
device_class=SensorDeviceClass.TIMESTAMP,
|
|
192
201
|
)
|
|
@@ -262,6 +271,66 @@ class MeteocatSensor(CoordinatorEntity[MeteocatSensorCoordinator], SensorEntity)
|
|
|
262
271
|
if self.entity_description.key == STATION_ID:
|
|
263
272
|
return self._station_id
|
|
264
273
|
# Información dinámica
|
|
274
|
+
|
|
275
|
+
if self.entity_description.key == FEELS_LIKE:
|
|
276
|
+
stations = self.coordinator.data or []
|
|
277
|
+
|
|
278
|
+
# Variables necesarias
|
|
279
|
+
temperature = None
|
|
280
|
+
humidity = None
|
|
281
|
+
wind_speed = None
|
|
282
|
+
|
|
283
|
+
# Obtener valores de las variables
|
|
284
|
+
for station in stations:
|
|
285
|
+
variables = station.get("variables", [])
|
|
286
|
+
for var in variables:
|
|
287
|
+
code = var.get("codi")
|
|
288
|
+
lectures = var.get("lectures", [])
|
|
289
|
+
if not lectures:
|
|
290
|
+
continue
|
|
291
|
+
latest_reading = lectures[-1].get("valor")
|
|
292
|
+
|
|
293
|
+
if code == TEMPERATURE_CODE:
|
|
294
|
+
temperature = float(latest_reading)
|
|
295
|
+
elif code == HUMIDITY_CODE:
|
|
296
|
+
humidity = float(latest_reading)
|
|
297
|
+
elif code == WIND_SPEED_CODE:
|
|
298
|
+
wind_speed = float(latest_reading)
|
|
299
|
+
|
|
300
|
+
# Verificar que todas las variables necesarias están presentes
|
|
301
|
+
if temperature is not None and humidity is not None and wind_speed is not None:
|
|
302
|
+
# Cálculo del windchill
|
|
303
|
+
windchill = (
|
|
304
|
+
13.1267 +
|
|
305
|
+
0.6215 * temperature -
|
|
306
|
+
11.37 * (wind_speed ** 0.16) +
|
|
307
|
+
0.3965 * temperature * (wind_speed ** 0.16)
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
# Cálculo del heat_index
|
|
311
|
+
heat_index = (
|
|
312
|
+
-8.78469476 +
|
|
313
|
+
1.61139411 * temperature +
|
|
314
|
+
2.338548839 * humidity -
|
|
315
|
+
0.14611605 * temperature * humidity -
|
|
316
|
+
0.012308094 * (temperature ** 2) -
|
|
317
|
+
0.016424828 * (humidity ** 2) +
|
|
318
|
+
0.002211732 * (temperature ** 2) * humidity +
|
|
319
|
+
0.00072546 * temperature * (humidity ** 2) -
|
|
320
|
+
0.000003582 * (temperature ** 2) * (humidity ** 2)
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
# Lógica de selección
|
|
324
|
+
if -50 <= temperature <= 10:
|
|
325
|
+
_LOGGER.debug(f"Sensación térmica por frío, calculada según la fórmula de Wind Chill: {windchill} ºC")
|
|
326
|
+
return round(windchill, 2)
|
|
327
|
+
elif temperature > 26 and humidity > 40:
|
|
328
|
+
_LOGGER.debug(f"Sensación térmica por calor, calculada según la fórmula de Heat Index: {heat_index} ºC")
|
|
329
|
+
return round(heat_index, 2)
|
|
330
|
+
else:
|
|
331
|
+
_LOGGER.debug(f"Sensación térmica idéntica a la temperatura actual: {temperature} ºC")
|
|
332
|
+
return round(temperature, 2)
|
|
333
|
+
|
|
265
334
|
sensor_code = self.CODE_MAPPING.get(self.entity_description.key)
|
|
266
335
|
|
|
267
336
|
if sensor_code is not None:
|
|
@@ -288,7 +357,8 @@ class MeteocatSensor(CoordinatorEntity[MeteocatSensorCoordinator], SensorEntity)
|
|
|
288
357
|
return self._convert_degrees_to_cardinal(value)
|
|
289
358
|
|
|
290
359
|
return value
|
|
291
|
-
|
|
360
|
+
|
|
361
|
+
# Lógica específica para el sensor de timestamp
|
|
292
362
|
if self.entity_description.key == "station_timestamp":
|
|
293
363
|
stations = self.coordinator.data or []
|
|
294
364
|
for station in stations:
|
|
@@ -330,14 +400,9 @@ class MeteocatSensor(CoordinatorEntity[MeteocatSensorCoordinator], SensorEntity)
|
|
|
330
400
|
|
|
331
401
|
_LOGGER.debug(f"Total precipitación acumulada: {total_precipitation} mm")
|
|
332
402
|
return total_precipitation
|
|
333
|
-
|
|
403
|
+
|
|
334
404
|
return None
|
|
335
|
-
|
|
336
|
-
@property
|
|
337
|
-
def precipitation_accumulated(self):
|
|
338
|
-
"""Return the accumulated precipitation state of the sensor."""
|
|
339
405
|
|
|
340
|
-
|
|
341
406
|
@staticmethod
|
|
342
407
|
def _convert_degrees_to_cardinal(degree: float) -> str:
|
|
343
408
|
"""Convert degrees to cardinal direction."""
|
|
@@ -346,7 +411,7 @@ class MeteocatSensor(CoordinatorEntity[MeteocatSensorCoordinator], SensorEntity)
|
|
|
346
411
|
|
|
347
412
|
directions = [
|
|
348
413
|
"N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE",
|
|
349
|
-
"S", "
|
|
414
|
+
"S", "SSW", "SW", "WSW", "WO", "WNW", "NW", "NNW", "N",
|
|
350
415
|
]
|
|
351
416
|
index = round(degree / 22.5) % 16
|
|
352
417
|
return directions[index]
|
|
@@ -1,26 +1,104 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
"entity": {
|
|
27
|
+
"sensor": {
|
|
28
|
+
"wind_speed": {
|
|
29
|
+
"name": "Wind Speed"
|
|
30
|
+
},
|
|
31
|
+
"wind_direction": {
|
|
32
|
+
"name": "Wind Direction",
|
|
33
|
+
"state": {
|
|
34
|
+
"N": "NN",
|
|
35
|
+
"NNE": "NNE",
|
|
36
|
+
"NE": "NE",
|
|
37
|
+
"ENE": "ENE",
|
|
38
|
+
"E": "E",
|
|
39
|
+
"ESE": "ESE",
|
|
40
|
+
"SE": "SE",
|
|
41
|
+
"SSE": "SSE",
|
|
42
|
+
"S": "S",
|
|
43
|
+
"SSW": "SSW",
|
|
44
|
+
"SW": "SW",
|
|
45
|
+
"WSW": "WSW",
|
|
46
|
+
"W": "W",
|
|
47
|
+
"WNW": "WNW",
|
|
48
|
+
"NW": "NW",
|
|
49
|
+
"NNW": "NNW",
|
|
50
|
+
"unknown": "Unknown"
|
|
15
51
|
}
|
|
16
52
|
},
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
53
|
+
"temperature": {
|
|
54
|
+
"name": "Temperature"
|
|
55
|
+
},
|
|
56
|
+
"humidity": {
|
|
57
|
+
"name": "Humidity"
|
|
58
|
+
},
|
|
59
|
+
"pressure": {
|
|
60
|
+
"name": "Pressure"
|
|
61
|
+
},
|
|
62
|
+
"precipitation": {
|
|
63
|
+
"name": "Precipitation"
|
|
64
|
+
},
|
|
65
|
+
"precipitation_accumulated": {
|
|
66
|
+
"name": "Precipitation Accumulated"
|
|
67
|
+
},
|
|
68
|
+
"solar_global_irradiance": {
|
|
69
|
+
"name": "Solar Global Irradiance"
|
|
70
|
+
},
|
|
71
|
+
"uv_index": {
|
|
72
|
+
"name": "UV Index"
|
|
73
|
+
},
|
|
74
|
+
"max_temperature": {
|
|
75
|
+
"name": "Max Temperature"
|
|
76
|
+
},
|
|
77
|
+
"min_temperature": {
|
|
78
|
+
"name": "Min Temperature"
|
|
79
|
+
},
|
|
80
|
+
"feels_like": {
|
|
81
|
+
"name": "Feels Like"
|
|
82
|
+
},
|
|
83
|
+
"wind_gust": {
|
|
84
|
+
"name": "Wind Gust"
|
|
85
|
+
},
|
|
86
|
+
"town_name": {
|
|
87
|
+
"name": "Town Name"
|
|
88
|
+
},
|
|
89
|
+
"town_id": {
|
|
90
|
+
"name": "Town ID"
|
|
91
|
+
},
|
|
92
|
+
"station_name": {
|
|
93
|
+
"name": "Station Name"
|
|
94
|
+
},
|
|
95
|
+
"station_id": {
|
|
96
|
+
"name": "Station ID"
|
|
97
|
+
},
|
|
98
|
+
"station_timestamp": {
|
|
99
|
+
"name": "Station Timestamp"
|
|
24
100
|
}
|
|
25
101
|
}
|
|
26
|
-
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
@@ -22,5 +22,82 @@
|
|
|
22
22
|
"connection_error": "Error de connexió. Reviseu la vostra connexió de xarxa.",
|
|
23
23
|
"unknown_error": "Error desconegut."
|
|
24
24
|
}
|
|
25
|
+
},
|
|
26
|
+
"entity": {
|
|
27
|
+
"sensor": {
|
|
28
|
+
"wind_speed": {
|
|
29
|
+
"name": "Vent Velocitat"
|
|
30
|
+
},
|
|
31
|
+
"wind_direction": {
|
|
32
|
+
"name": "Vent Direcció",
|
|
33
|
+
"state": {
|
|
34
|
+
"N": "NN",
|
|
35
|
+
"NNE": "NNE",
|
|
36
|
+
"NE": "NE",
|
|
37
|
+
"ENE": "ENE",
|
|
38
|
+
"E": "E",
|
|
39
|
+
"ESE": "ESE",
|
|
40
|
+
"SE": "SE",
|
|
41
|
+
"SSE": "SSE",
|
|
42
|
+
"S": "S",
|
|
43
|
+
"SSW": "SSO",
|
|
44
|
+
"SW": "SO",
|
|
45
|
+
"WSW": "OSO",
|
|
46
|
+
"W": "O",
|
|
47
|
+
"WNW": "ONO",
|
|
48
|
+
"NW": "NO",
|
|
49
|
+
"NNW": "NNO",
|
|
50
|
+
"unknown": "Desconegut"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"temperature": {
|
|
54
|
+
"name": "Temperatura"
|
|
55
|
+
},
|
|
56
|
+
"humidity": {
|
|
57
|
+
"name": "Humitat"
|
|
58
|
+
},
|
|
59
|
+
"pressure": {
|
|
60
|
+
"name": "Pressió"
|
|
61
|
+
},
|
|
62
|
+
"precipitation": {
|
|
63
|
+
"name": "Precipitació"
|
|
64
|
+
},
|
|
65
|
+
"precipitation_accumulated": {
|
|
66
|
+
"name": "Precipitació Acumulada"
|
|
67
|
+
},
|
|
68
|
+
"solar_global_irradiance": {
|
|
69
|
+
"name": "Irradiació Solar Global"
|
|
70
|
+
},
|
|
71
|
+
"uv_index": {
|
|
72
|
+
"name": "UV Índex"
|
|
73
|
+
},
|
|
74
|
+
"max_temperature": {
|
|
75
|
+
"name": "Temperatura Max"
|
|
76
|
+
},
|
|
77
|
+
"min_temperature": {
|
|
78
|
+
"name": "Temperatura Min"
|
|
79
|
+
},
|
|
80
|
+
"feels_like": {
|
|
81
|
+
"name": "Sensació Tèrmica"
|
|
82
|
+
},
|
|
83
|
+
"wind_gust": {
|
|
84
|
+
"name": "Vent Ratxa"
|
|
85
|
+
},
|
|
86
|
+
"town_name": {
|
|
87
|
+
"name": "Municipi Nom"
|
|
88
|
+
},
|
|
89
|
+
"town_id": {
|
|
90
|
+
"name": "Municipi ID"
|
|
91
|
+
},
|
|
92
|
+
"station_name": {
|
|
93
|
+
"name": "Estació Nom"
|
|
94
|
+
},
|
|
95
|
+
"station_id": {
|
|
96
|
+
"name": "Estació ID"
|
|
97
|
+
},
|
|
98
|
+
"station_timestamp": {
|
|
99
|
+
"name": "Estació Timestamp"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
25
102
|
}
|
|
26
|
-
}
|
|
103
|
+
}
|
|
@@ -22,5 +22,83 @@
|
|
|
22
22
|
"connection_error": "Connection error. Please check your network.",
|
|
23
23
|
"unknown_error": "An unknown error occurred."
|
|
24
24
|
}
|
|
25
|
+
},
|
|
26
|
+
"entity": {
|
|
27
|
+
"sensor": {
|
|
28
|
+
"wind_speed": {
|
|
29
|
+
"name": "Wind Speed"
|
|
30
|
+
},
|
|
31
|
+
"wind_direction": {
|
|
32
|
+
"name": "Wind Direction",
|
|
33
|
+
"state": {
|
|
34
|
+
"N": "NN",
|
|
35
|
+
"NNE": "NNE",
|
|
36
|
+
"NE": "NE",
|
|
37
|
+
"ENE": "ENE",
|
|
38
|
+
"E": "E",
|
|
39
|
+
"ESE": "ESE",
|
|
40
|
+
"SE": "SE",
|
|
41
|
+
"SSE": "SSE",
|
|
42
|
+
"S": "S",
|
|
43
|
+
"SSW": "SSW",
|
|
44
|
+
"SW": "SW",
|
|
45
|
+
"WSW": "WSW",
|
|
46
|
+
"W": "W",
|
|
47
|
+
"WNW": "WNW",
|
|
48
|
+
"NW": "NW",
|
|
49
|
+
"NNW": "NNW",
|
|
50
|
+
"unknown": "Unknown"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"temperature": {
|
|
54
|
+
"name": "Temperature"
|
|
55
|
+
},
|
|
56
|
+
"humidity": {
|
|
57
|
+
"name": "Humidity"
|
|
58
|
+
},
|
|
59
|
+
"pressure": {
|
|
60
|
+
"name": "Pressure"
|
|
61
|
+
},
|
|
62
|
+
"precipitation": {
|
|
63
|
+
"name": "Precipitation"
|
|
64
|
+
},
|
|
65
|
+
"precipitation_accumulated": {
|
|
66
|
+
"name": "Precipitation Accumulated"
|
|
67
|
+
},
|
|
68
|
+
"solar_global_irradiance": {
|
|
69
|
+
"name": "Solar Global Irradiance"
|
|
70
|
+
},
|
|
71
|
+
"uv_index": {
|
|
72
|
+
"name": "UV Index"
|
|
73
|
+
},
|
|
74
|
+
"max_temperature": {
|
|
75
|
+
"name": "Max Temperature"
|
|
76
|
+
},
|
|
77
|
+
"min_temperature": {
|
|
78
|
+
"name": "Min Temperature"
|
|
79
|
+
},
|
|
80
|
+
"feels_like": {
|
|
81
|
+
"name": "Feels Like"
|
|
82
|
+
},
|
|
83
|
+
"wind_gust": {
|
|
84
|
+
"name": "Wind Gust"
|
|
85
|
+
},
|
|
86
|
+
"town_name": {
|
|
87
|
+
"name": "Town Name"
|
|
88
|
+
},
|
|
89
|
+
"town_id": {
|
|
90
|
+
"name": "Town ID"
|
|
91
|
+
},
|
|
92
|
+
"station_name": {
|
|
93
|
+
"name": "Station Name"
|
|
94
|
+
},
|
|
95
|
+
"station_id": {
|
|
96
|
+
"name": "Station ID"
|
|
97
|
+
},
|
|
98
|
+
"station_timestamp": {
|
|
99
|
+
"name": "Station Timestamp"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
25
102
|
}
|
|
26
|
-
}
|
|
103
|
+
}
|
|
104
|
+
|
|
@@ -22,5 +22,83 @@
|
|
|
22
22
|
"connection_error": "Error de conexión. Revise su conexión de red.",
|
|
23
23
|
"unknown_error": "Error desconocido."
|
|
24
24
|
}
|
|
25
|
+
},
|
|
26
|
+
"entity": {
|
|
27
|
+
"sensor": {
|
|
28
|
+
"wind_speed": {
|
|
29
|
+
"name": "Viento Velocidad"
|
|
30
|
+
},
|
|
31
|
+
"wind_direction": {
|
|
32
|
+
"name": "Viento Dirección",
|
|
33
|
+
"state": {
|
|
34
|
+
"N": "NN",
|
|
35
|
+
"NNE": "NNE",
|
|
36
|
+
"NE": "NE",
|
|
37
|
+
"ENE": "ENE",
|
|
38
|
+
"E": "E",
|
|
39
|
+
"ESE": "ESE",
|
|
40
|
+
"SE": "SE",
|
|
41
|
+
"SSE": "SSE",
|
|
42
|
+
"S": "S",
|
|
43
|
+
"SSW": "SSO",
|
|
44
|
+
"SW": "SO",
|
|
45
|
+
"WSW": "OSO",
|
|
46
|
+
"W": "O",
|
|
47
|
+
"WNW": "ONO",
|
|
48
|
+
"NW": "NO",
|
|
49
|
+
"NNW": "NNO",
|
|
50
|
+
"unknown": "Desconocido"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"temperature": {
|
|
54
|
+
"name": "Temperatura"
|
|
55
|
+
},
|
|
56
|
+
"humidity": {
|
|
57
|
+
"name": "Humedad"
|
|
58
|
+
},
|
|
59
|
+
"pressure": {
|
|
60
|
+
"name": "Presión"
|
|
61
|
+
},
|
|
62
|
+
"precipitation": {
|
|
63
|
+
"name": "Precipitación"
|
|
64
|
+
},
|
|
65
|
+
"precipitation_accumulated": {
|
|
66
|
+
"name": "Precipitación Acumulada"
|
|
67
|
+
},
|
|
68
|
+
"solar_global_irradiance": {
|
|
69
|
+
"name": "Irradiación Solar Global"
|
|
70
|
+
},
|
|
71
|
+
"uv_index": {
|
|
72
|
+
"name": "UV Índice"
|
|
73
|
+
},
|
|
74
|
+
"max_temperature": {
|
|
75
|
+
"name": "Temperatura Max"
|
|
76
|
+
},
|
|
77
|
+
"min_temperature": {
|
|
78
|
+
"name": "Temperatura Min"
|
|
79
|
+
},
|
|
80
|
+
"feels_like": {
|
|
81
|
+
"name": "Sensación Térmica"
|
|
82
|
+
},
|
|
83
|
+
"wind_gust": {
|
|
84
|
+
"name": "Viento Racha"
|
|
85
|
+
},
|
|
86
|
+
"town_name": {
|
|
87
|
+
"name": "Municipio Nombre"
|
|
88
|
+
},
|
|
89
|
+
"town_id": {
|
|
90
|
+
"name": "Municipio ID"
|
|
91
|
+
},
|
|
92
|
+
"station_name": {
|
|
93
|
+
"name": "Estación Nombre"
|
|
94
|
+
},
|
|
95
|
+
"station_id": {
|
|
96
|
+
"name": "Estación ID"
|
|
97
|
+
},
|
|
98
|
+
"station_timestamp": {
|
|
99
|
+
"name": "Estación Timestamp"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
25
102
|
}
|
|
26
|
-
}
|
|
103
|
+
}
|
|
104
|
+
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# version.py
|
|
2
|
-
__version__ = "0.1.
|
|
2
|
+
__version__ = "0.1.32"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meteocat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "[](https://opensource.org/licenses/Apache-2.0)\r [](https://pypi.org/project/meteocat)\r [](https://gitlab.com/figorr/meteocat/commits/master)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|