From a49069ee6ee22e479da47ddbe8aa78bd351ea1a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20L=C3=A9p=C3=A9e?= Date: Sun, 24 Nov 2024 16:43:13 +0100 Subject: [PATCH] feat: Better Modbus Slave option readability --- custom_components/hitachi_yutaki/config_flow.py | 3 ++- custom_components/hitachi_yutaki/translations/en.json | 2 +- custom_components/hitachi_yutaki/translations/fr.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/custom_components/hitachi_yutaki/config_flow.py b/custom_components/hitachi_yutaki/config_flow.py index 86aca8c..68021ed 100644 --- a/custom_components/hitachi_yutaki/config_flow.py +++ b/custom_components/hitachi_yutaki/config_flow.py @@ -44,7 +44,7 @@ { vol.Required(CONF_PORT, default=DEFAULT_PORT): cv.port, vol.Required(CONF_SLAVE, default=DEFAULT_SLAVE): vol.All( - cv.positive_int, vol.Range(min=1, max=247) + vol.Coerce(int), vol.Range(min=1, max=247) ), vol.Optional( CONF_SCAN_INTERVAL, default=DEFAULT_SCAN_INTERVAL @@ -58,6 +58,7 @@ class HitachiYutakiConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): """Handle a config flow for Hitachi Yutaki.""" VERSION = 1 + MINOR_VERSION = 1 def __init__(self): """Initialize the config flow.""" diff --git a/custom_components/hitachi_yutaki/translations/en.json b/custom_components/hitachi_yutaki/translations/en.json index 0e81620..f591893 100644 --- a/custom_components/hitachi_yutaki/translations/en.json +++ b/custom_components/hitachi_yutaki/translations/en.json @@ -33,7 +33,7 @@ "host": "IP address", "show_advanced": "Show advanced settings" }, - "description": "Configure your Hitachi Yutaki heat pump via ATW-MBS-02 gateway.", + "description": "Configure your Hitachi Yutaki heat pump via the Modbus TCP/IP interface exposed by the ATW-MBS-02 gateway. Important: your heat pump must be configured in 'Air' control mode to allow the gateway full read and write access to the heat pump control registers.", "title": "Hitachi Yutaki" }, "advanced": { diff --git a/custom_components/hitachi_yutaki/translations/fr.json b/custom_components/hitachi_yutaki/translations/fr.json index dc544f3..dd588a8 100644 --- a/custom_components/hitachi_yutaki/translations/fr.json +++ b/custom_components/hitachi_yutaki/translations/fr.json @@ -33,7 +33,7 @@ "host": "Adresse IP", "show_advanced": "Afficher les paramètres avancés" }, - "description": "Configurez votre pompe à chaleur Hitachi Yutaki via la passerelle ATW-MBS-02.", + "description": "Configurez votre pompe à chaleur Hitachi Yutaki via l'interface Modbus TCP/IP exposée par la passerelle ATW-MBS-02. Important : votre pompe à chaleur doit être configurée en mode de contrôle 'Air' pour permettre à la passerelle d'avoir un accès complet en lecture et écriture aux registres de contrôle de la pompe à chaleur.", "title": "Hitachi Yutaki" }, "advanced": {