meteocat 3.0.0 → 3.2.0

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 (40) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +8 -2
  2. package/.github/ISSUE_TEMPLATE/config.yml +7 -0
  3. package/.github/ISSUE_TEMPLATE/improvement.md +39 -0
  4. package/.github/ISSUE_TEMPLATE/new_function.md +41 -0
  5. package/.github/labels.yml +63 -0
  6. package/.github/workflows/autocloser.yaml +11 -9
  7. package/.github/workflows/close-on-label.yml +48 -0
  8. package/.github/workflows/force-sync-labels.yml +18 -0
  9. package/.github/workflows/sync-gitlab.yml +15 -4
  10. package/.github/workflows/sync-labels.yml +21 -0
  11. package/CHANGELOG.md +80 -11
  12. package/README.md +16 -4
  13. package/custom_components/meteocat/__init__.py +57 -42
  14. package/custom_components/meteocat/condition.py +6 -2
  15. package/custom_components/meteocat/config_flow.py +231 -4
  16. package/custom_components/meteocat/const.py +17 -2
  17. package/custom_components/meteocat/coordinator.py +1122 -101
  18. package/custom_components/meteocat/helpers.py +31 -36
  19. package/custom_components/meteocat/manifest.json +3 -2
  20. package/custom_components/meteocat/options_flow.py +71 -3
  21. package/custom_components/meteocat/sensor.py +660 -247
  22. package/custom_components/meteocat/strings.json +252 -15
  23. package/custom_components/meteocat/translations/ca.json +249 -13
  24. package/custom_components/meteocat/translations/en.json +252 -15
  25. package/custom_components/meteocat/translations/es.json +252 -15
  26. package/custom_components/meteocat/version.py +1 -1
  27. package/filetree.txt +12 -3
  28. package/hacs.json +1 -1
  29. package/images/daily_forecast_2_alerts.png +0 -0
  30. package/images/daily_forecast_no_alerts.png +0 -0
  31. package/images/diagnostic_sensors.png +0 -0
  32. package/images/dynamic_sensors.png +0 -0
  33. package/images/options.png +0 -0
  34. package/images/regenerate_assets.png +0 -0
  35. package/images/setup_options.png +0 -0
  36. package/images/system_options.png +0 -0
  37. package/package.json +1 -1
  38. package/pyproject.toml +1 -1
  39. package/scripts/update_version.sh +6 -0
  40. package/.github/workflows/close-duplicates.yml +0 -57
@@ -34,9 +34,9 @@
34
34
  }
35
35
  },
36
36
  "options": {
37
- "step":{
37
+ "step": {
38
38
  "init": {
39
- "description": "Setup the API Key, the API limits and regenerate 'assets' files.",
39
+ "description": "Setup the API Key, the API limits, regenerate 'assets' files, or update coordinates.",
40
40
  "title": "Setup options",
41
41
  "data": {
42
42
  "option": "Options"
@@ -50,6 +50,15 @@
50
50
  "description": "Setup the API limits.",
51
51
  "title": "API limits"
52
52
  },
53
+ "update_coordinates": {
54
+ "description": "Enter new coordinates. Current coordinates: latitude {current_latitude}, longitude {current_longitude}. Current altitude: {current_altitude} meters.",
55
+ "title": "Update Coordinates",
56
+ "data": {
57
+ "latitude": "Latitude",
58
+ "longitude": "Longitude",
59
+ "altitude": "Altitude (meters)"
60
+ }
61
+ },
53
62
  "confirm_regenerate_assets": {
54
63
  "description": "Regenerate missing assets files.",
55
64
  "title": "Regenerate assets",
@@ -61,7 +70,9 @@
61
70
  "error": {
62
71
  "cannot_connect": "Cannot connect. Error when checking the new API Key.",
63
72
  "unknown": "Unknown error when checking the new API Key.",
64
- "invalid_limit": "Invalid limit. The limit must be a positive number."
73
+ "invalid_limit": "Invalid limit. The limit must be a positive number.",
74
+ "invalid_coordinates": "Coordinates must be within Catalonia's range (latitude: 40.5 to 42.5, longitude: 0.1 to 3.3).",
75
+ "invalid_altitude": "Altitude must be a non-negative number."
65
76
  }
66
77
  },
67
78
  "selector": {
@@ -69,7 +80,8 @@
69
80
  "options": {
70
81
  "update_api_and_limits": "Update API Key and limits.",
71
82
  "update_limits_only": "Update API limits.",
72
- "regenerate_assets": "Regenerate 'assets' files."
83
+ "regenerate_assets": "Regenerate 'assets' files.",
84
+ "update_coordinates": "Update coordinates (latitude and longitude) and altitude (meters)."
73
85
  }
74
86
  }
75
87
  },
@@ -269,7 +281,7 @@
269
281
  "cloud_cloud": {
270
282
  "name": "Cloud-Cloud"
271
283
  },
272
- "cloud_ground_neg":{
284
+ "cloud_ground_neg": {
273
285
  "name": "Cloud-Ground Negative"
274
286
  },
275
287
  "cloud_ground_pos": {
@@ -283,7 +295,7 @@
283
295
  "cloud_cloud": {
284
296
  "name": "Cloud-Cloud"
285
297
  },
286
- "cloud_ground_neg":{
298
+ "cloud_ground_neg": {
287
299
  "name": "Cloud-Ground Negative"
288
300
  },
289
301
  "cloud_ground_pos": {
@@ -533,7 +545,8 @@
533
545
  "wind_35": "Max. wind speed > 35 m/s",
534
546
  "wind_30": "Max. wind speed > 30 m/s",
535
547
  "wind_25": "Max. wind speed > 25 m/s",
536
- "wind_20": "Max. wind speed > 20 m/s"
548
+ "wind_20": "Max. wind speed > 20 m/s",
549
+ "unknown": "Unknown"
537
550
  }
538
551
  },
539
552
  "peligro": {
@@ -572,7 +585,8 @@
572
585
  "hail_2_cm": "Hail with diameter > 2 cm",
573
586
  "microburst": "Microburst",
574
587
  "intensity_40_30": "Intensity > 40 mm / 30 minutes",
575
- "intensity_20_30": "Intensity > 20 mm / 30 minutes"
588
+ "intensity_20_30": "Intensity > 20 mm / 30 minutes",
589
+ "unknown": "Unknown"
576
590
  }
577
591
  },
578
592
  "peligro": {
@@ -610,7 +624,8 @@
610
624
  "state": {
611
625
  "microburst": "Microburst",
612
626
  "rain_200_24": "Amount > 200 mm /24 hours",
613
- "rain_100_24": "Amount > 100 mm /24 hours"
627
+ "rain_100_24": "Amount > 100 mm /24 hours",
628
+ "unknown": "Unknown"
614
629
  }
615
630
  },
616
631
  "peligro": {
@@ -649,7 +664,8 @@
649
664
  "microburst": "Microburst",
650
665
  "tornadoes": "Tornadoes or waterspouts",
651
666
  "waves_4": "Waves > 4.00 meters (rough sea)",
652
- "waves_2_50": "Waves > 2.50 meters (tidal)"
667
+ "waves_2_50": "Waves > 2.50 meters (tidal)",
668
+ "unknown": "Unknown"
653
669
  }
654
670
  },
655
671
  "peligro": {
@@ -686,7 +702,8 @@
686
702
  "name": "Threshold",
687
703
  "state": {
688
704
  "cold_very_intense": "Very intense cold",
689
- "cold_intense": "Intense cold"
705
+ "cold_intense": "Intense cold",
706
+ "unknown": "Unknown"
690
707
  }
691
708
  },
692
709
  "peligro": {
@@ -723,7 +740,8 @@
723
740
  "name": "Threshold",
724
741
  "state": {
725
742
  "heat_very_intense": "Very intense hot",
726
- "heat_intense": "Intense heat"
743
+ "heat_intense": "Intense heat",
744
+ "unknown": "Unknown"
727
745
  }
728
746
  },
729
747
  "peligro": {
@@ -760,7 +778,8 @@
760
778
  "name": "Threshold",
761
779
  "state": {
762
780
  "heat_night_very_intense": "Very intense night heat",
763
- "heat_night_intense": "Intense night heat"
781
+ "heat_night_intense": "Intense night heat",
782
+ "unknown": "Unknown"
764
783
  }
765
784
  },
766
785
  "peligro": {
@@ -806,7 +825,8 @@
806
825
  "thickness_5_at_300": "thickness > 5 cm at altitudes below 300 meters",
807
826
  "thickness_5_at_600": "thickness > 5 cm at altitudes above 600 meters up to 800 meters",
808
827
  "thickness_2_at_300": "thickness > 2 cm at altitudes above 300 meters up to 600 meters",
809
- "thickness_0_at_300": "thickness ≥ 0 cm at altitudes below 300 meters"
828
+ "thickness_0_at_300": "thickness ≥ 0 cm at altitudes below 300 meters",
829
+ "unknown": "Unknown"
810
830
  }
811
831
  },
812
832
  "peligro": {
@@ -816,7 +836,224 @@
816
836
  "name": "Level"
817
837
  }
818
838
  }
839
+ },
840
+ "sun": {
841
+ "name": "Sun",
842
+ "state": {
843
+ "above_horizon": "Above Horizon",
844
+ "below_horizon": "Below Horizon"
845
+ },
846
+ "state_attributes": {
847
+ "elevation": {
848
+ "name": "Elevation"
849
+ },
850
+ "azimuth": {
851
+ "name": "Azimuth"
852
+ },
853
+ "rising": {
854
+ "name": "Rising",
855
+ "state": {
856
+ "false": "No",
857
+ "true": "Yes"
858
+ }
859
+ },
860
+ "last_updated": {
861
+ "name": "Last Updated"
862
+ },
863
+ "sunrise": {
864
+ "name": "Sunrise"
865
+ },
866
+ "sunset": {
867
+ "name": "Sunset"
868
+ },
869
+ "noon": {
870
+ "name": "Noon"
871
+ },
872
+ "dawn_civil": {
873
+ "name": "Civil Dawn"
874
+ },
875
+ "dusk_civil": {
876
+ "name": "Civil Dusk"
877
+ },
878
+ "dawn_nautical": {
879
+ "name": "Nautical Dawn"
880
+ },
881
+ "dusk_nautical": {
882
+ "name": "Nautical Dusk"
883
+ },
884
+ "dawn_astronomical": {
885
+ "name": "Astronomical Dawn"
886
+ },
887
+ "dusk_astronomical": {
888
+ "name": "Astronomical Dusk"
889
+ },
890
+ "midnight": {
891
+ "name": "Solar Midnight"
892
+ },
893
+ "daylight_duration": {
894
+ "name": "Daylight Duration"
895
+ },
896
+ "daylight_duration_hms": {
897
+ "name": "Daylight Duration (HH:MM:SS)"
898
+ }
899
+ }
900
+ },
901
+ "sunrise": {
902
+ "name": "Sunrise",
903
+ "state_attributes": {
904
+ "friendly_time": {
905
+ "name": "Time"
906
+ },
907
+ "friendly_date": {
908
+ "name": "Date"
909
+ },
910
+ "friendly_day": {
911
+ "name": "Day",
912
+ "state": {
913
+ "monday": "Monday",
914
+ "tuesday": "Tuesday",
915
+ "wednesday": "Wednesday",
916
+ "thursday": "Thursday",
917
+ "friday": "Friday",
918
+ "saturday": "Saturday",
919
+ "sunday": "Sunday"
920
+ }
921
+ }
922
+ }
923
+ },
924
+ "sunset": {
925
+ "name": "Sunset",
926
+ "state_attributes": {
927
+ "friendly_time": {
928
+ "name": "Time"
929
+ },
930
+ "friendly_date": {
931
+ "name": "Date"
932
+ },
933
+ "friendly_day": {
934
+ "name": "Day",
935
+ "state": {
936
+ "monday": "Monday",
937
+ "tuesday": "Tuesday",
938
+ "wednesday": "Wednesday",
939
+ "thursday": "Thursday",
940
+ "friday": "Friday",
941
+ "saturday": "Saturday",
942
+ "sunday": "Sunday"
943
+ }
944
+ }
945
+ }
946
+ },
947
+ "sun_file_status": {
948
+ "name": "Sun File",
949
+ "state": {
950
+ "updated": "Updated",
951
+ "obsolete": "Obsolete"
952
+ },
953
+ "state_attributes": {
954
+ "update_date": {
955
+ "name": "Date"
956
+ }
957
+ }
958
+ },
959
+ "moon_phase": {
960
+ "name": "Moon phase",
961
+ "state": {
962
+ "new_moon": "New moon",
963
+ "waxing_crescent": "Waxing crescent",
964
+ "first_quarter": "First quarter",
965
+ "waxing_gibbous": "Waxing gibbous",
966
+ "full_moon": "Full moon",
967
+ "waning_gibbous": "Waning gibbous",
968
+ "last_quarter": "Last quarter",
969
+ "waning_crescent": "Waning crescent",
970
+ "unknown": "Unknown"
971
+ },
972
+ "state_attributes": {
973
+ "moon_day": {
974
+ "name": "Moon day"
975
+ },
976
+ "moon_phase_value": {
977
+ "name": "Phase value"
978
+ },
979
+ "illuminated_percentage": {
980
+ "name": "Illuminated (%)"
981
+ },
982
+ "moon_distance": {
983
+ "name": "Distance (Km)"
984
+ },
985
+ "moon_angular_diameter": {
986
+ "name": "Angular diameter (arcsec)"
987
+ },
988
+ "lunation": {
989
+ "name": "Lunation"
990
+ },
991
+ "lunation_duration": {
992
+ "name": "Lunation duration"
993
+ },
994
+ "last_updated": {
995
+ "name": "Last updated"
996
+ }
997
+ }
998
+ },
999
+ "moon_file_status": {
1000
+ "name": "Moon File",
1001
+ "state": {
1002
+ "updated": "Updated",
1003
+ "obsolete": "Obsolete"
1004
+ },
1005
+ "state_attributes": {
1006
+ "update_date": {
1007
+ "name": "Date"
1008
+ }
1009
+ }
1010
+ },
1011
+ "moonrise": {
1012
+ "name": "Moonrise",
1013
+ "state_attributes": {
1014
+ "friendly_time": {
1015
+ "name": "Time"
1016
+ },
1017
+ "friendly_date": {
1018
+ "name": "Date"
1019
+ },
1020
+ "friendly_day": {
1021
+ "name": "Day",
1022
+ "state": {
1023
+ "monday": "Monday",
1024
+ "tuesday": "Tuesday",
1025
+ "wednesday": "Wednesday",
1026
+ "thursday": "Thursday",
1027
+ "friday": "Friday",
1028
+ "saturday": "Saturday",
1029
+ "sunday": "Sunday"
1030
+ }
1031
+ }
1032
+ }
1033
+ },
1034
+ "moonset": {
1035
+ "name": "Moonset",
1036
+ "state_attributes": {
1037
+ "friendly_time": {
1038
+ "name": "Time"
1039
+ },
1040
+ "friendly_date": {
1041
+ "name": "Date"
1042
+ },
1043
+ "friendly_day": {
1044
+ "name": "Day",
1045
+ "state": {
1046
+ "monday": "Monday",
1047
+ "tuesday": "Tuesday",
1048
+ "wednesday": "Wednesday",
1049
+ "thursday": "Thursday",
1050
+ "friday": "Friday",
1051
+ "saturday": "Saturday",
1052
+ "sunday": "Sunday"
1053
+ }
1054
+ }
1055
+ }
819
1056
  }
820
1057
  }
821
1058
  }
822
- }
1059
+ }