diff --git a/custom_components/ta_coe/config_flow.py b/custom_components/ta_coe/config_flow.py index 172f9b8..744e505 100644 --- a/custom_components/ta_coe/config_flow.py +++ b/custom_components/ta_coe/config_flow.py @@ -225,7 +225,6 @@ async def async_step_init( menu_options=[ "general", "add_send_values", - "change_send_values", "delete_send_values", ], ) @@ -278,47 +277,6 @@ async def async_step_add_send_values( errors=errors, ) - async def async_step_change_send_values( - self, user_input: dict[str, Any] | None = None - ) -> FlowResult: - """Handle options change sensors send via CoE.""" - errors: dict[str, Any] = {} - - if user_input is not None: - new_id = user_input[CONF_ENTITIES_TO_SEND] - old_id = user_input["old_value"] - - if ( - ( - old_id in self.data[CONF_ENTITIES_TO_SEND].values() - or new_id not in self.data[CONF_ENTITIES_TO_SEND].values() - ) - and old_id not in FREE_SLOT_MARKERS - and new_id not in FREE_SLOT_MARKERS - ): - index = [ - k - for k, v in self.data[CONF_ENTITIES_TO_SEND].items() - if v == old_id - ][0] - - self.data[CONF_ENTITIES_TO_SEND][index] = new_id - - return self.async_create_entry(title="", data=self.data) - - errors["base"] = "invalid_entity" - - return self.async_show_form( - step_id="change_send_values", - data_schema=vol.Schema( - { - vol.Required(CONF_ENTITIES_TO_SEND): cv.string, - vol.Required("old_value"): cv.string, - } - ), - errors=errors, - ) - async def async_step_delete_send_values(self, user_input=None): """Handle options remove sensors send via CoE.""" errors: dict[str, Any] = {} diff --git a/custom_components/ta_coe/strings.json b/custom_components/ta_coe/strings.json index 47f4320..c7050ab 100644 --- a/custom_components/ta_coe/strings.json +++ b/custom_components/ta_coe/strings.json @@ -49,13 +49,6 @@ "entities_to_send": "Entity id to send" } }, - "change_send_values": { - "title": "Change sensors", - "data": { - "old_value": "ID to override", - "entities_to_send": "New ID" - } - }, "delete_send_values": { "title": "Delete sensors", "data": { diff --git a/custom_components/ta_coe/translations/de.json b/custom_components/ta_coe/translations/de.json index 943e59f..f5fa7c0 100644 --- a/custom_components/ta_coe/translations/de.json +++ b/custom_components/ta_coe/translations/de.json @@ -49,13 +49,6 @@ "entities_to_send": "ID der Entität zum senden" } }, - "change_send_values": { - "title": "Sensoren ändern", - "data": { - "old_value": "Alte ID", - "entities_to_send": "Neu ID" - } - }, "delete_send_values": { "title": "Sensoren löschen", "data": { diff --git a/custom_components/ta_coe/translations/en.json b/custom_components/ta_coe/translations/en.json index 47f4320..c7050ab 100644 --- a/custom_components/ta_coe/translations/en.json +++ b/custom_components/ta_coe/translations/en.json @@ -49,13 +49,6 @@ "entities_to_send": "Entity id to send" } }, - "change_send_values": { - "title": "Change sensors", - "data": { - "old_value": "ID to override", - "entities_to_send": "New ID" - } - }, "delete_send_values": { "title": "Delete sensors", "data": {