992098fbf1
- Implemented a new config flow in `config_flow.py` for SmartIR, allowing users to select platforms, controllers, and devices through a guided interface. - Added support for new device codes in `codes_index.json` for Apton and Andersson manufacturers. - Enhanced fan, light, and media player components to support setup from config entries. - Introduced `strings.json` and `translations/en.json` for improved localization of the configuration steps. - Created a tool `build_index.py` to rebuild the `codes_index.json` from individual device JSON files. - Updated `smartir_capture.py` to handle single-code modes and excluded modes for better device configuration. - Added `iot_class` and `config_flow` attributes in `manifest.json` to support the new configuration flow.
104 lines
3.9 KiB
JSON
104 lines
3.9 KiB
JSON
{
|
|
"config": {
|
|
"step": {
|
|
"user": {
|
|
"title": "SmartIR — Choose Platform",
|
|
"description": "Select the type of device you want to control via IR.",
|
|
"data": {
|
|
"platform": "Platform"
|
|
}
|
|
},
|
|
"controller_filter": {
|
|
"title": "SmartIR — Filter by Controller",
|
|
"description": "Narrow the device list to a specific controller type, or show all.",
|
|
"data": {
|
|
"controller_type": "Controller Type"
|
|
}
|
|
},
|
|
"manufacturer": {
|
|
"title": "SmartIR — Select Manufacturer",
|
|
"description": "Choose your device manufacturer. Select **'Enter code manually'** if your device is not listed.",
|
|
"data": {
|
|
"manufacturer": "Manufacturer"
|
|
}
|
|
},
|
|
"device_select": {
|
|
"title": "SmartIR — Select Device",
|
|
"description": "Choose the device model for **{manufacturer}**. Each entry shows the numeric code and supported model names.",
|
|
"data": {
|
|
"device_code": "Device"
|
|
}
|
|
},
|
|
"device_manual": {
|
|
"title": "SmartIR — Enter Device Code",
|
|
"description": "Enter the numeric device code. The file will be loaded from local storage or downloaded from GitHub.",
|
|
"data": {
|
|
"device_code": "Device Code"
|
|
}
|
|
},
|
|
"device_name": {
|
|
"title": "SmartIR — Confirm Device Name",
|
|
"description": "**{manufacturer}** — {models}\nController: {controller_type} | Code: {device_code}\n\nEdit the name shown in Home Assistant.",
|
|
"data": {
|
|
"name": "Device Name"
|
|
}
|
|
},
|
|
"controller": {
|
|
"title": "SmartIR — Controller Connection",
|
|
"description": "Controller type: **{controller_type}**\n\n{controller_hint}",
|
|
"data": {
|
|
"controller_data": "Controller Data",
|
|
"delay": "Command Delay (seconds)"
|
|
}
|
|
},
|
|
"options_platform": {
|
|
"title": "SmartIR — Optional Settings",
|
|
"description": "**{manufacturer}** — {models}\nController: {controller_type}\n\nAll fields below are optional.",
|
|
"data": {
|
|
"temperature_sensor": "Temperature Sensor",
|
|
"humidity_sensor": "Humidity Sensor",
|
|
"power_sensor": "Power Sensor",
|
|
"power_sensor_restore_state": "Restore state from power sensor on startup",
|
|
"device_class": "Device Class (e.g. tv, receiver)",
|
|
"source_names": "Source Name Overrides (JSON, e.g. {\"HDMI1\": \"Apple TV\"})"
|
|
}
|
|
}
|
|
},
|
|
"error": {
|
|
"invalid_device_code": "Device code not found locally and could not be downloaded from GitHub. Check the code number and your internet connection.",
|
|
"controller_data_required": "Controller data is required.",
|
|
"unknown": "Unexpected error — check the Home Assistant logs."
|
|
},
|
|
"abort": {
|
|
"already_configured": "A SmartIR device with this code and controller is already configured."
|
|
}
|
|
},
|
|
"options": {
|
|
"step": {
|
|
"controller": {
|
|
"title": "SmartIR — Edit Controller",
|
|
"description": "Controller type: **{controller_type}**\n\n{controller_hint}",
|
|
"data": {
|
|
"controller_data": "Controller Data",
|
|
"delay": "Command Delay (seconds)"
|
|
}
|
|
},
|
|
"options_platform": {
|
|
"title": "SmartIR — Edit Optional Settings",
|
|
"description": "**{manufacturer}** — {models}\nController: {controller_type}",
|
|
"data": {
|
|
"temperature_sensor": "Temperature Sensor",
|
|
"humidity_sensor": "Humidity Sensor",
|
|
"power_sensor": "Power Sensor",
|
|
"power_sensor_restore_state": "Restore state from power sensor on startup",
|
|
"device_class": "Device Class (e.g. tv, receiver)",
|
|
"source_names": "Source Name Overrides (JSON)"
|
|
}
|
|
}
|
|
},
|
|
"error": {
|
|
"controller_data_required": "Controller data is required."
|
|
}
|
|
}
|
|
}
|