Skip to content

Commit

Permalink
Correct name of integration everywhere.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudd-O committed Aug 23, 2024
1 parent 718e7ad commit 32acbea
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 34 deletions.
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# homeassistant-meteoswiss (forked)

This is the Meteo Swiss integration for Home Assistant.

**Note: due to changes in how HACS loads custom components
(reflected in hassfest validation tests), we have had to
change how this repository is installed. Unfortunately,
this caused problems with how an interim version of the
integratoin itself is loaded. See installation instructions
below to get your setup fixed up. We regret this mess.**
This is the MeteoSwiss integration for Home Assistant.

## Features

Expand All @@ -18,8 +11,6 @@ below to get your setup fixed up. We regret this mess.**
(every entity has a unique ID).
* Detects when your real-time weather station has been retired,
and offers suggestions on how to fix the issue.
* Imports the old Meteo Swiss YAML configuration and alerts
you to the needed removal of the deprecated YAML.
* Code is much cleaner and works properly.

See below for common issues.
Expand Down Expand Up @@ -98,7 +89,7 @@ Now you are ready to add one or more instances of the integration.

![enter image description here](https://github.com/Rudd-O/homeassistant-meteoswiss/raw/master/docs/add.png)

- Search for *Meteo Swiss* and then proceed:
- Search for *MeteoSwiss* and then proceed:

![enter image description here](https://github.com/Rudd-O/homeassistant-meteoswiss/raw/master/docs/search.png)

Expand Down Expand Up @@ -176,8 +167,8 @@ logger:

## Information sources

Data comes from the Meteo Swiss official data sources.
Forecasts are extracted from the Meteo Swiss API.
Data comes from the MeteoSwiss official data sources.
Forecasts are extracted from the MeteoSwiss API.
Current conditions are from official data files.

A primer on Swiss weather stations can be found at https://rudd-o.com/meteostations .
Expand All @@ -202,7 +193,7 @@ then reinstalling the integration through this repository.

### How to migrate away from websylv's integration

1. First remove any successfully-setup Meteo Swiss integrations.
1. First remove any successfully-setup "Meteo Swiss" (note the space) integrations.
2. Remove the integration itself from HACS.
3. Remove the YAML config you might have been using before.
3. Add this repository as a custom integration repo in HACS, then install it to your Home Assistant. See above for installation instructions.
Expand Down
2 changes: 1 addition & 1 deletion custom_components/meteoswiss/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Lifecycle of Swiss Meteo."""
"""Lifecycle of MeteoSwiss."""

import datetime
import logging
Expand Down
6 changes: 3 additions & 3 deletions custom_components/meteoswiss/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Constants for Meteo Swiss."""
"""Constants for MeteoSwiss."""

from __future__ import annotations

Expand Down Expand Up @@ -28,12 +28,12 @@

DEFAULT_UPDATE_INTERVAL = 5

USER_AGENT = "Meteo Swiss Home Assistant integration"
USER_AGENT = "MeteoSwiss Home Assistant integration"

# Mapping for conditions vs icon ID of meteoswiss
# ID < 100 for day icons
# ID > 100 for night icons
# Meteo swiss has more lvl for cloudy an rainy than home assistant
# MeteoSwiss has more lvl for cloudy an rainy than home assistant
CONDITION_CLASSES: Final[dict[str, list[int]]] = {
"clear-night": [101],
"cloudy": [5, 35, 105, 135],
Expand Down
2 changes: 1 addition & 1 deletion custom_components/meteoswiss/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"domain": "meteoswiss",
"name": "Meteo Swiss",
"name": "MeteoSwiss",
"codeowners": [
"@Rudd-O"
],
Expand Down
8 changes: 2 additions & 6 deletions custom_components/meteoswiss/sensor.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import logging
import pprint


from homeassistant.components.sensor import (
SensorEntity,
SensorStateClass
)
from homeassistant.components.sensor import SensorEntity, SensorStateClass
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import STATE_UNAVAILABLE
from homeassistant.core import HomeAssistant, callback
Expand Down Expand Up @@ -54,7 +50,7 @@ class MeteoSwissSensor(
CoordinatorEntity[MeteoSwissDataUpdateCoordinator],
SensorEntity,
):
"""Represents a sensor from Meteo Swiss."""
"""Represents a sensor from MeteoSwiss."""

def __init__(
self,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/meteoswiss/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"issues": {
"deprecated_yaml": {
"title": "The MeteoSwiss YAML configuration is being removed",
"description": "Configuring MeteoSwiss using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the Swiss Meteo configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
"description": "Configuring MeteoSwiss using YAML is being removed.\n\nYour existing YAML configuration has been imported into the UI automatically.\n\nRemove the MeteoSwiss configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
},
"station_no_data": {
"title": "MeteoSwiss weather station appears to be gone",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/meteoswiss/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"issues": {
"deprecated_yaml": {
"title": "La configuración MeteoSwiss mediante YAML configuration está obsoleta",
"description": "Configurar MeteoSwiss mediante YAML será removida a futuro.\n\nSu configuración existente ha sido importada automáticamente a su interfaz de usuario.\n\nRemueva la sección de configuración de Swiss Meteo configuration de su archivo configuration.yaml file y reinicie Home Assistant para solucionar esta advertencia."
"description": "Configurar MeteoSwiss mediante YAML será removida a futuro.\n\nSu configuración existente ha sido importada automáticamente a su interfaz de usuario.\n\nRemueva la sección de configuración de MeteoSwiss configuration de su archivo configuration.yaml file y reinicie Home Assistant para solucionar esta advertencia."
},
"station_no_data": {
"title": "Una estación meteorológica de tiempo real parece estar ausente",
Expand Down
12 changes: 6 additions & 6 deletions custom_components/meteoswiss/translations/nb.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"issues": {
"deprecated_yaml": {
"title": "Konfigurasjonen for Meteo Sveits i YAML-format blir fjernet",
"description": "Konfigurering av Meteo Sveits ved hjelp av YAML blir fjernet.\n\nDin eksisterende YAML-konfigurasjon er blitt importert inn i brukergrensesnittet automatisk.\n\nFjern Swiss Meteo-konfigurasjonen fra din configuration.yaml-fil og restart Home Assistant for å løse dette problemet."
"title": "Konfigurasjonen for MeteoSveits i YAML-format blir fjernet",
"description": "Konfigurering av MeteoSveits ved hjelp av YAML blir fjernet.\n\nDin eksisterende YAML-konfigurasjon er blitt importert inn i brukergrensesnittet automatisk.\n\nFjern MeteoSveits-konfigurasjonen fra din configuration.yaml-fil og restart Home Assistant for å løse dette problemet."
},
"station_no_data": {
"title": "Værstatonen for Meteo Sveits ser ut til å være gått",
"description": "Den sanntids værstasjonen Meteo Sveits bruker ({station}) skiller ikke lenger ut data.\n\nFor tiden er det bare mulig å løse dette ved å fjerne og gjeninnføre Meteo Sveits-integreringen, velge en ny sanntids værstasjon.\n\nIndtil dette løses, vil alle sanntids- og sensorenheter og rapporter som kommer fra denne stasjonen vises som uoppløselige."
"title": "Værstatonen for MeteoSveits ser ut til å være gått",
"description": "Den sanntids værstasjonen MeteoSveits bruker ({station}) skiller ikke lenger ut data.\n\nFor tiden er det bare mulig å løse dette ved å fjerne og gjeninnføre MeteoSveits-integreringen, velge en ny sanntids værstasjon.\n\nIndtil dette løses, vil alle sanntids- og sensorenheter og rapporter som kommer fra denne stasjonen vises som uoppløselige."
},
"improperly_configured": {
"title": "Integrasjonsfellet for Meteo Sveits er ikke konfigurert korrekt",
"description": "Meteo Sveits-integreringen med entry ID {entry_id} er ikke konfigurert korrekt.\n\nVennligst fjern din konfigurasjon og skap den på nytt."
"title": "Integrasjonsfellet for MeteoSveits er ikke konfigurert korrekt",
"description": "MeteoSveits-integreringen med entry ID {entry_id} er ikke konfigurert korrekt.\n\nVennligst fjern din konfigurasjon og skap den på nytt."
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Meteo Swiss (forked)",
"name": "MeteoSwiss (forked)",
"render_readme": true,
"country": "CH"
}

0 comments on commit 32acbea

Please sign in to comment.