diff --git a/.github/issue_template.md b/.github/issue_template.md index 85d2b98..8f04dd5 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -21,9 +21,9 @@ Issues not containing the minimum requirements will be closed: **Home Assistant version** -**SmartIR version** +**Infrarize version** -**SmartIR configuration** +**Infrarize configuration** ```yaml diff --git a/.gitignore b/.gitignore index 26ac95b..b57f28b 100644 --- a/.gitignore +++ b/.gitignore @@ -131,5 +131,5 @@ dmypy.json temp/ tmp/ -# SmartIR capture tool session (contains local MQTT credentials/config) +# Infrarize capture tool session (contains local MQTT credentials/config) tools/capture_session.json diff --git a/custom_components/smartir/__init__.py b/custom_components/infrarize/__init__.py similarity index 88% rename from custom_components/smartir/__init__.py rename to custom_components/infrarize/__init__.py index ba53365..140f689 100644 --- a/custom_components/smartir/__init__.py +++ b/custom_components/infrarize/__init__.py @@ -18,16 +18,16 @@ from homeassistant.helpers.typing import ConfigType _LOGGER = logging.getLogger(__name__) -DOMAIN = 'smartir' +DOMAIN = 'infrarize' VERSION = '1.18.1' MANIFEST_URL = ( "https://raw.githubusercontent.com/" - "kobimx/SmartIR/{}/" - "custom_components/smartir/manifest.json") + "kobimx/Infrarize/{}/" + "custom_components/infrarize/manifest.json") REMOTE_BASE_URL = ( "https://raw.githubusercontent.com/" - "kobimx/SmartIR/{}/" - "custom_components/smartir/") + "kobimx/Infrarize/{}/" + "custom_components/infrarize/") COMPONENT_ABS_DIR = os.path.dirname( os.path.abspath(__file__)) @@ -43,7 +43,7 @@ CONFIG_SCHEMA = vol.Schema({ }, extra=vol.ALLOW_EXTRA) async def async_setup(hass, config): - """Set up the SmartIR component.""" + """Set up the Infrarize component.""" conf = config.get(DOMAIN) if conf is None: @@ -68,7 +68,7 @@ async def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Set up SmartIR from a config entry (UI-configured device).""" + """Set up Infrarize from a config entry (UI-configured device).""" platform = entry.data.get('platform') if not platform: return False @@ -85,7 +85,7 @@ async def _async_options_updated(hass, entry): async def async_unload_entry(hass, entry): - """Unload a SmartIR config entry.""" + """Unload an Infrarize config entry.""" platform = entry.data.get('platform') if not platform: return True @@ -106,21 +106,21 @@ async def _update(hass, branch, do_update=False, notify_if_latest=True): if notify_if_latest: hass.components.persistent_notification.async_create( "You're already using the latest version!", - title='SmartIR') + title='Infrarize') return if StrictVersion(current_ha_version) < StrictVersion(min_ha_version): hass.components.persistent_notification.async_create( - "There is a new version of SmartIR integration, but it is **incompatible** " - "with your system. Please first update Home Assistant.", title='SmartIR') + "There is a new version of Infrarize integration, but it is **incompatible** " + "with your system. Please first update Home Assistant.", title='Infrarize') return if do_update is False: hass.components.persistent_notification.async_create( - "A new version of SmartIR integration is available ({}). " - "Call the ``smartir.update_component`` service to update " + "A new version of Infrarize integration is available ({}). " + "Call the ``infrarize.update_component`` service to update " "the integration. \n\n **Release notes:** \n{}" - .format(last_version, release_notes), title='SmartIR') + .format(last_version, release_notes), title='Infrarize') return # Begin update @@ -139,12 +139,12 @@ async def _update(hass, branch, do_update=False, notify_if_latest=True): if has_errors: hass.components.persistent_notification.async_create( - "There was an error updating one or more files of SmartIR. " - "Please check the logs for more information.", title='SmartIR') + "There was an error updating one or more files of Infrarize. " + "Please check the logs for more information.", title='Infrarize') else: hass.components.persistent_notification.async_create( "Successfully updated to {}. Please restart Home Assistant." - .format(last_version), title='SmartIR') + .format(last_version), title='Infrarize') except Exception: _LOGGER.error("An error occurred while checking for updates.") diff --git a/custom_components/smartir/climate.py b/custom_components/infrarize/climate.py similarity index 97% rename from custom_components/smartir/climate.py rename to custom_components/infrarize/climate.py index 258eabd..57d8811 100644 --- a/custom_components/smartir/climate.py +++ b/custom_components/infrarize/climate.py @@ -21,7 +21,7 @@ from .controller import get_controller _LOGGER = logging.getLogger(__name__) -DEFAULT_NAME = "SmartIR Climate" +DEFAULT_NAME = "Infrarize Climate" DEFAULT_DELAY = 0.5 CONF_UNIQUE_ID = 'unique_id' @@ -54,7 +54,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ async def async_setup_entry(hass, entry, async_add_entities): - """Set up SmartIR Climate from a config entry.""" + """Set up Infrarize Climate from a config entry.""" config = {**entry.data, **entry.options} config.pop('platform', None) config.setdefault('unique_id', entry.unique_id) @@ -63,7 +63,7 @@ async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the IR Climate platform.""" - _LOGGER.debug("Setting up the smartir platform") + _LOGGER.debug("Setting up the infrarize platform") device_code = config.get(CONF_DEVICE_CODE) device_files_subdir = os.path.join('codes', 'climate') device_files_absdir = os.path.join(COMPONENT_ABS_DIR, device_files_subdir) @@ -80,7 +80,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= try: codes_source = ("https://raw.githubusercontent.com/" - "kobimx/SmartIR/master/" + "kobimx/Infrarize/master/" "codes/climate/{}.json") await Helper.downloader(codes_source.format(device_code), device_json_path) @@ -101,13 +101,13 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= _LOGGER.error("The device JSON file is invalid") return - async_add_entities([SmartIRClimate( + async_add_entities([InfrarizeClimate( hass, config, device_data )]) -class SmartIRClimate(ClimateEntity, RestoreEntity): +class InfrarizeClimate(ClimateEntity, RestoreEntity): def __init__(self, hass, config, device_data): - _LOGGER.debug(f"SmartIRClimate init started for device {config.get(CONF_NAME)} supported models {device_data['supportedModels']}") + _LOGGER.debug(f"InfrarizeClimate init started for device {config.get(CONF_NAME)} supported models {device_data['supportedModels']}") self.hass = hass self._unique_id = config.get(CONF_UNIQUE_ID) self._name = config.get(CONF_NAME) diff --git a/custom_components/smartir/codes_index.json b/custom_components/infrarize/codes_index.json similarity index 100% rename from custom_components/smartir/codes_index.json rename to custom_components/infrarize/codes_index.json diff --git a/custom_components/smartir/config_flow.py b/custom_components/infrarize/config_flow.py similarity index 97% rename from custom_components/smartir/config_flow.py rename to custom_components/infrarize/config_flow.py index 1f9c6c0..0fdedc5 100644 --- a/custom_components/smartir/config_flow.py +++ b/custom_components/infrarize/config_flow.py @@ -1,4 +1,4 @@ -"""Config flow for SmartIR — 6-step UI wizard with device list selection.""" +"""Config flow for Infrarize — 6-step UI wizard with device list selection.""" from __future__ import annotations import json @@ -47,7 +47,7 @@ from .const import ( PLATFORMS, ) -DOMAIN = "smartir" +DOMAIN = "infrarize" _LOGGER = logging.getLogger(__name__) @@ -63,7 +63,7 @@ async def _load_device_json(platform: str, device_code: int) -> dict | None: if not os.path.exists(path): source = ( "https://raw.githubusercontent.com/" - f"kobimx/SmartIR/master/codes/{subdir}/{device_code}.json" + f"kobimx/Infrarize/master/codes/{subdir}/{device_code}.json" ) try: await Helper.downloader(source, path) @@ -120,7 +120,7 @@ def _options_schema(platform: str, defaults: dict | None = None) -> vol.Schema: return vol.Optional(key) # Power sensors are only ever checked for on/off state (see - # SmartIRClimate._async_power_sensor_changed and the equivalent methods in + # InfrarizeClimate._async_power_sensor_changed and the equivalent methods in # fan.py, light.py, media_player.py, which compare .state to STATE_ON/STATE_OFF) # so restrict the picker to domains that expose a binary on/off state. power_sensor_selector = EntitySelector( @@ -237,8 +237,8 @@ def _device_placeholders(device_data: dict, platform: str) -> dict: # ── Config Flow ─────────────────────────────────────────────────────────────── -class SmartIRConfigFlow(ConfigFlow, domain=DOMAIN): - """Handle multi-step UI config flow for SmartIR.""" +class InfrarizeConfigFlow(ConfigFlow, domain=DOMAIN): + """Handle multi-step UI config flow for Infrarize.""" VERSION = 1 @@ -518,7 +518,7 @@ class SmartIRConfigFlow(ConfigFlow, domain=DOMAIN): self._delay = DEFAULT_DELAY uid = ( - f"smartir_{self._platform}_{self._device_code}" + f"infrarize_{self._platform}_{self._device_code}" f"_{self._controller_data}" ) await self.async_set_unique_id(uid) @@ -576,21 +576,21 @@ class SmartIRConfigFlow(ConfigFlow, domain=DOMAIN): } options.update(_parse_options(self._platform, options_input)) - mfr = self._device_data.get("manufacturer", "SmartIR") + mfr = self._device_data.get("manufacturer", "Infrarize") title = f"{mfr} — {self._device_name}" return self.async_create_entry(title=title, data=data, options=options) @staticmethod @callback - def async_get_options_flow(config_entry: ConfigEntry) -> SmartIROptionsFlow: - return SmartIROptionsFlow(config_entry) + def async_get_options_flow(config_entry: ConfigEntry) -> InfrarizeOptionsFlow: + return InfrarizeOptionsFlow(config_entry) # ── Options Flow ────────────────────────────────────────────────────────────── -class SmartIROptionsFlow(OptionsFlow): - """Edit controller and sensor settings for an existing SmartIR entry.""" +class InfrarizeOptionsFlow(OptionsFlow): + """Edit controller and sensor settings for an existing Infrarize entry.""" def __init__(self, config_entry: ConfigEntry) -> None: self._entry = config_entry diff --git a/custom_components/smartir/const.py b/custom_components/infrarize/const.py similarity index 92% rename from custom_components/smartir/const.py rename to custom_components/infrarize/const.py index 60e23a3..45430fb 100644 --- a/custom_components/smartir/const.py +++ b/custom_components/infrarize/const.py @@ -1,4 +1,4 @@ -"""Constants for the SmartIR config flow and platforms.""" +"""Constants for the Infrarize config flow and platforms.""" from __future__ import annotations # ── Sentinels ────────────────────────────────────────────────────────────────── @@ -38,10 +38,10 @@ PLATFORM_SUBDIR: dict[str, str] = { } DEFAULT_DEVICE_NAMES: dict[str, str] = { - "climate": "SmartIR Climate", - "fan": "SmartIR Fan", - "media_player": "SmartIR Media Player", - "light": "SmartIR Light", + "climate": "Infrarize Climate", + "fan": "Infrarize Fan", + "media_player": "Infrarize Media Player", + "light": "Infrarize Light", } # ── Controller metadata ──────────────────────────────────────────────────────── diff --git a/custom_components/smartir/controller.py b/custom_components/infrarize/controller.py similarity index 100% rename from custom_components/smartir/controller.py rename to custom_components/infrarize/controller.py diff --git a/custom_components/smartir/fan.py b/custom_components/infrarize/fan.py similarity index 97% rename from custom_components/smartir/fan.py rename to custom_components/infrarize/fan.py index 0a81494..d95a2c5 100644 --- a/custom_components/smartir/fan.py +++ b/custom_components/infrarize/fan.py @@ -24,7 +24,7 @@ from .controller import get_controller _LOGGER = logging.getLogger(__name__) -DEFAULT_NAME = "SmartIR Fan" +DEFAULT_NAME = "Infrarize Fan" DEFAULT_DELAY = 0.5 CONF_UNIQUE_ID = 'unique_id' @@ -46,7 +46,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ async def async_setup_entry(hass, entry, async_add_entities): - """Set up SmartIR Fan from a config entry.""" + """Set up Infrarize Fan from a config entry.""" config = {**entry.data, **entry.options} config.pop('platform', None) config.setdefault('unique_id', entry.unique_id) @@ -71,7 +71,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= try: codes_source = ("https://raw.githubusercontent.com/" - "kobimx/SmartIR/master/" + "kobimx/Infrarize/master/" "codes/fan/{}.json") await Helper.downloader(codes_source.format(device_code), device_json_path) @@ -92,11 +92,11 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= _LOGGER.error("The device JSON file is invalid") return - async_add_entities([SmartIRFan( + async_add_entities([InfrarizeFan( hass, config, device_data )]) -class SmartIRFan(FanEntity, RestoreEntity): +class InfrarizeFan(FanEntity, RestoreEntity): def __init__(self, hass, config, device_data): self.hass = hass self._unique_id = config.get(CONF_UNIQUE_ID) diff --git a/custom_components/smartir/light.py b/custom_components/infrarize/light.py similarity index 98% rename from custom_components/smartir/light.py rename to custom_components/infrarize/light.py index c7e767e..3b4f706 100644 --- a/custom_components/smartir/light.py +++ b/custom_components/infrarize/light.py @@ -27,7 +27,7 @@ from .controller import get_controller _LOGGER = logging.getLogger(__name__) -DEFAULT_NAME = "SmartIR Light" +DEFAULT_NAME = "Infrarize Light" DEFAULT_DELAY = 0.5 CONF_UNIQUE_ID = "unique_id" @@ -57,7 +57,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( async def async_setup_entry(hass, entry, async_add_entities): - """Set up SmartIR Light from a config entry.""" + """Set up Infrarize Light from a config entry.""" config = {**entry.data, **entry.options} config.pop('platform', None) config.setdefault('unique_id', entry.unique_id) @@ -90,7 +90,7 @@ async def async_setup_platform( try: codes_source = ( "https://raw.githubusercontent.com/" - "kobimx/SmartIR/master/" + "kobimx/Infrarize/master/" "codes/light/{}.json" ) @@ -117,7 +117,7 @@ async def async_setup_platform( _LOGGER.error("The device JSON file is invalid") return - async_add_entities([SmartIRLight(hass, config, device_data)]) + async_add_entities([InfrarizeLight(hass, config, device_data)]) # find the closest match in a sorted list @@ -137,7 +137,7 @@ def closest_match(value, list): return len(list) - 1 -class SmartIRLight(LightEntity, RestoreEntity): +class InfrarizeLight(LightEntity, RestoreEntity): def __init__(self, hass, config, device_data): self.hass = hass self._unique_id = config.get(CONF_UNIQUE_ID) diff --git a/custom_components/smartir/manifest.json b/custom_components/infrarize/manifest.json similarity index 82% rename from custom_components/smartir/manifest.json rename to custom_components/infrarize/manifest.json index 8dd1d11..05d3660 100644 --- a/custom_components/smartir/manifest.json +++ b/custom_components/infrarize/manifest.json @@ -1,7 +1,7 @@ { - "domain": "smartir", - "name": "SmartIR", - "documentation": "https://github.com/kobimx/SmartIR", + "domain": "infrarize", + "name": "Infrarize", + "documentation": "https://github.com/kobimx/Infrarize", "dependencies": [], "codeowners": ["@kobimx"], "requirements": ["aiofiles>=0.6.0"], diff --git a/custom_components/smartir/media_player.py b/custom_components/infrarize/media_player.py similarity index 97% rename from custom_components/smartir/media_player.py rename to custom_components/infrarize/media_player.py index 41b5589..3af0a0c 100644 --- a/custom_components/smartir/media_player.py +++ b/custom_components/infrarize/media_player.py @@ -19,7 +19,7 @@ from .controller import get_controller _LOGGER = logging.getLogger(__name__) -DEFAULT_NAME = "SmartIR Media Player" +DEFAULT_NAME = "Infrarize Media Player" DEFAULT_DEVICE_CLASS = "tv" DEFAULT_DELAY = 0.5 @@ -44,7 +44,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ async def async_setup_entry(hass, entry, async_add_entities): - """Set up SmartIR Media Player from a config entry.""" + """Set up Infrarize Media Player from a config entry.""" config = {**entry.data, **entry.options} config.pop('platform', None) config.setdefault('unique_id', entry.unique_id) @@ -69,7 +69,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= try: codes_source = ("https://raw.githubusercontent.com/" - "kobimx/SmartIR/master/" + "kobimx/Infrarize/master/" "codes/media_player/{}.json") await Helper.downloader(codes_source.format(device_code), device_json_path) @@ -90,11 +90,11 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= _LOGGER.error("The device JSON file is invalid") return - async_add_entities([SmartIRMediaPlayer( + async_add_entities([InfrarizeMediaPlayer( hass, config, device_data )]) -class SmartIRMediaPlayer(MediaPlayerEntity, RestoreEntity): +class InfrarizeMediaPlayer(MediaPlayerEntity, RestoreEntity): def __init__(self, hass, config, device_data): self.hass = hass self._unique_id = config.get(CONF_UNIQUE_ID) diff --git a/custom_components/infrarize/services.yaml b/custom_components/infrarize/services.yaml new file mode 100644 index 0000000..1efe5fb --- /dev/null +++ b/custom_components/infrarize/services.yaml @@ -0,0 +1,4 @@ +check_updates: + description: Check for Infrarize updates. +update_component: + description: Update Infrarize component. \ No newline at end of file diff --git a/custom_components/smartir/strings.json b/custom_components/infrarize/strings.json similarity index 84% rename from custom_components/smartir/strings.json rename to custom_components/infrarize/strings.json index 16a31f7..aead93d 100644 --- a/custom_components/smartir/strings.json +++ b/custom_components/infrarize/strings.json @@ -2,49 +2,49 @@ "config": { "step": { "user": { - "title": "SmartIR — Choose Platform", + "title": "Infrarize — Choose Platform", "description": "Select the type of device you want to control via IR.", "data": { "platform": "Platform" } }, "controller_filter": { - "title": "SmartIR — Filter by Controller", + "title": "Infrarize — 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", + "title": "Infrarize — 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", + "title": "Infrarize — 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", + "title": "Infrarize — 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", + "title": "Infrarize — 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", + "title": "Infrarize — Controller Connection", "description": "Controller type: **{controller_type}**\n\n{controller_hint}", "data": { "controller_data": "Controller Data", @@ -52,7 +52,7 @@ } }, "options_platform": { - "title": "SmartIR — Optional Settings", + "title": "Infrarize — Optional Settings", "description": "**{manufacturer}** — {models}\nController: {controller_type}\n\nAll fields below are optional.", "data": { "temperature_sensor": "Temperature Sensor", @@ -70,13 +70,13 @@ "unknown": "Unexpected error — check the Home Assistant logs." }, "abort": { - "already_configured": "A SmartIR device with this code and controller is already configured." + "already_configured": "A Infrarize device with this code and controller is already configured." } }, "options": { "step": { "controller": { - "title": "SmartIR — Edit Controller", + "title": "Infrarize — Edit Controller", "description": "Controller type: **{controller_type}**\n\n{controller_hint}", "data": { "controller_data": "Controller Data", @@ -84,7 +84,7 @@ } }, "options_platform": { - "title": "SmartIR — Edit Optional Settings", + "title": "Infrarize — Edit Optional Settings", "description": "**{manufacturer}** — {models}\nController: {controller_type}", "data": { "temperature_sensor": "Temperature Sensor", diff --git a/custom_components/smartir/translations/en.json b/custom_components/infrarize/translations/en.json similarity index 84% rename from custom_components/smartir/translations/en.json rename to custom_components/infrarize/translations/en.json index 16a31f7..aead93d 100644 --- a/custom_components/smartir/translations/en.json +++ b/custom_components/infrarize/translations/en.json @@ -2,49 +2,49 @@ "config": { "step": { "user": { - "title": "SmartIR — Choose Platform", + "title": "Infrarize — Choose Platform", "description": "Select the type of device you want to control via IR.", "data": { "platform": "Platform" } }, "controller_filter": { - "title": "SmartIR — Filter by Controller", + "title": "Infrarize — 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", + "title": "Infrarize — 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", + "title": "Infrarize — 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", + "title": "Infrarize — 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", + "title": "Infrarize — 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", + "title": "Infrarize — Controller Connection", "description": "Controller type: **{controller_type}**\n\n{controller_hint}", "data": { "controller_data": "Controller Data", @@ -52,7 +52,7 @@ } }, "options_platform": { - "title": "SmartIR — Optional Settings", + "title": "Infrarize — Optional Settings", "description": "**{manufacturer}** — {models}\nController: {controller_type}\n\nAll fields below are optional.", "data": { "temperature_sensor": "Temperature Sensor", @@ -70,13 +70,13 @@ "unknown": "Unexpected error — check the Home Assistant logs." }, "abort": { - "already_configured": "A SmartIR device with this code and controller is already configured." + "already_configured": "A Infrarize device with this code and controller is already configured." } }, "options": { "step": { "controller": { - "title": "SmartIR — Edit Controller", + "title": "Infrarize — Edit Controller", "description": "Controller type: **{controller_type}**\n\n{controller_hint}", "data": { "controller_data": "Controller Data", @@ -84,7 +84,7 @@ } }, "options_platform": { - "title": "SmartIR — Edit Optional Settings", + "title": "Infrarize — Edit Optional Settings", "description": "**{manufacturer}** — {models}\nController: {controller_type}", "data": { "temperature_sensor": "Temperature Sensor", diff --git a/custom_components/smartir/services.yaml b/custom_components/smartir/services.yaml deleted file mode 100644 index 67a2121..0000000 --- a/custom_components/smartir/services.yaml +++ /dev/null @@ -1,4 +0,0 @@ -check_updates: - description: Check for SmartIR updates. -update_component: - description: Update SmartIR component. \ No newline at end of file diff --git a/docs/CLIMATE.md b/docs/CLIMATE.md index e7eeb9d..b01df3d 100644 --- a/docs/CLIMATE.md +++ b/docs/CLIMATE.md @@ -1,9 +1,9 @@

- SmartIR Climate + Infrarize Climate

For this platform to work, we need a .json file containing all the necessary IR commands. -Find your device's brand code [here](CLIMATE.md#available-codes-for-climate-devices) and add the number in the `device_code` field. If your device is not working, you will need to learn your own codes and place the Json file in `smartir/codes/climate` subfolders. ~~[Keite Trần](https://github.com/keitetran/BroadlinkIRTools) developed [an amazing web-based app](https://keitetran.github.io/BroadlinkIRTools/) for this job.~~ +Find your device's brand code [here](CLIMATE.md#available-codes-for-climate-devices) and add the number in the `device_code` field. If your device is not working, you will need to learn your own codes and place the Json file in `infrarize/codes/climate` subfolders. ~~[Keite Trần](https://github.com/keitetran/BroadlinkIRTools) developed [an amazing web-based app](https://keitetran.github.io/BroadlinkIRTools/) for this job.~~ _Please note that the device_code field only accepts positive numbers. The .json extension is not required._ ## Configuration variables: @@ -23,10 +23,10 @@ _Please note that the device_code field only accepts positive numbers. The .json Add a Broadlink RM device named "Bedroom" via config flow (read the [docs](https://www.home-assistant.io/integrations/broadlink/)). ```yaml -smartir: +infrarize: climate: - - platform: smartir + - platform: infrarize name: Office AC unique_id: office_ac device_code: 1000 @@ -38,7 +38,7 @@ climate: ## Example (using xiaomi controller): ```yaml -smartir: +infrarize: remote: - platform: xiaomi_miio @@ -46,7 +46,7 @@ remote: token: YOUR_TOKEN climate: - - platform: smartir + - platform: infrarize name: Office AC unique_id: office_ac device_code: 2000 @@ -58,10 +58,10 @@ climate: ## Example (using mqtt controller): ```yaml -smartir: +infrarize: climate: - - platform: smartir + - platform: infrarize name: Office AC unique_id: office_ac device_code: 3000 @@ -74,10 +74,10 @@ climate: ## Example (using LOOKin controller): ```yaml -smartir: +infrarize: climate: - - platform: smartir + - platform: infrarize name: Office AC unique_id: office_ac device_code: 4000 @@ -110,10 +110,10 @@ remote_transmitter: ``` HA configuration.yaml: ```yaml -smartir: +infrarize: climate: - - platform: smartir + - platform: infrarize name: Office AC unique_id: office_ac device_code: 8000 diff --git a/docs/FAN.md b/docs/FAN.md index 966e57d..e10007a 100644 --- a/docs/FAN.md +++ b/docs/FAN.md @@ -1,9 +1,9 @@

- SmartIR Media Player + Infrarize Media Player

For this platform to work, we need a .json file containing all the necessary IR or RF commands. -Find your device's brand code [here](FAN.md#available-codes-for-fan-devices) and add the number in the `device_code` field. The compoenent will download it to the correct folder. If your device is not working, you will need to learn your own codes and place the .json file in `smartir/codes/fan/` subfolders. Please note that the `device_code` field only accepts positive numbers. The .json extension is not required. +Find your device's brand code [here](FAN.md#available-codes-for-fan-devices) and add the number in the `device_code` field. The compoenent will download it to the correct folder. If your device is not working, you will need to learn your own codes and place the .json file in `infrarize/codes/fan/` subfolders. Please note that the `device_code` field only accepts positive numbers. The .json extension is not required. ## Configuration variables @@ -19,10 +19,10 @@ Find your device's brand code [here](FAN.md#available-codes-for-fan-devices) and Add a Broadlink RM device named "Bedroom" via config flow (read the [docs](https://www.home-assistant.io/integrations/broadlink/)). ```yaml -smartir: +infrarize: fan: - - platform: smartir + - platform: infrarize name: Bedroom fan unique_id: bedroom_fan device_code: 1000 @@ -33,7 +33,7 @@ fan: ## Example (using xiaomi controller) ```yaml -smartir: +infrarize: remote: - platform: xiaomi_miio @@ -41,7 +41,7 @@ remote: token: YOUR_TOKEN fan: - - platform: smartir + - platform: infrarize name: Bedroom fan unique_id: bedroom_fan device_code: 2000 @@ -52,10 +52,10 @@ fan: ## Example (using mqtt controller) ```yaml -smartir: +infrarize: fan: - - platform: smartir + - platform: infrarize name: Bedroom fan unique_id: bedroom_fan device_code: 3000 @@ -66,10 +66,10 @@ fan: ## Example (using LOOKin controller) ```yaml -smartir: +infrarize: fan: - - platform: smartir + - platform: infrarize name: Bedroom fan unique_id: bedroom_fan device_code: 4000 @@ -104,10 +104,10 @@ remote_transmitter: HA configuration.yaml: ```yaml -smartir: +infrarize: fan: - - platform: smartir + - platform: infrarize name: Bedroom fan unique_id: bedroom_fan device_code: 4000 diff --git a/docs/LIGHT.md b/docs/LIGHT.md index 2d86e30..59a298d 100644 --- a/docs/LIGHT.md +++ b/docs/LIGHT.md @@ -1,9 +1,9 @@

- SmartIR light + Infrarize light

For this platform to work, we need a .json file containing all the necessary IR or RF commands. -Find your device's brand code [here](LIGHT.md#available-codes-for-light-devices) and add the number in the `device_code` field. The component will download it to the correct folder. If your device is not working, you will need to learn your own codes and place the .json file in `smartir/codes/light` subfolders. Please note that the `device_code` field only accepts positive numbers. The .json extension is not required. +Find your device's brand code [here](LIGHT.md#available-codes-for-light-devices) and add the number in the `device_code` field. The component will download it to the correct folder. If your device is not working, you will need to learn your own codes and place the .json file in `infrarize/codes/light` subfolders. Please note that the `device_code` field only accepts positive numbers. The .json extension is not required. ## Configuration variables @@ -19,10 +19,10 @@ Find your device's brand code [here](LIGHT.md#available-codes-for-light-devices) Add a Broadlink RM device named "Bedroom" via config flow (read the [docs](https://www.homeassistant.io/integrations/broadlink/)). ```yaml -smartir: +infrarize: light: - - platform: smartir + - platform: infrarize name: Bedroom Ceiling Light unique_id: bedroom_ceiling_light device_code: 1000 diff --git a/docs/MEDIA_PLAYER.md b/docs/MEDIA_PLAYER.md index d685c89..001360a 100644 --- a/docs/MEDIA_PLAYER.md +++ b/docs/MEDIA_PLAYER.md @@ -1,9 +1,9 @@

- SmartIR Media Player + Infrarize Media Player

For this platform to work, we need a .json file containing all the necessary IR commands. -Find your device's brand code [here](MEDIA_PLAYER.md#available-codes-for-tv-devices) and add the number in the `device_code` field. The component will download it to the correct folder. If your device is not working, you will need to learn your own codes and place the .json file in `smartir/codes/media_player/` subfolders. Please note that the `device_code` field only accepts positive numbers. The .json extension is not required. +Find your device's brand code [here](MEDIA_PLAYER.md#available-codes-for-tv-devices) and add the number in the `device_code` field. The component will download it to the correct folder. If your device is not working, you will need to learn your own codes and place the .json file in `infrarize/codes/media_player/` subfolders. Please note that the `device_code` field only accepts positive numbers. The .json extension is not required. ## Configuration variables: **name** (Optional): The name of the device
@@ -18,10 +18,10 @@ Find your device's brand code [here](MEDIA_PLAYER.md#available-codes-for-tv-devi Add a Broadlink RM device named "Bedroom" via config flow (read the [docs](https://www.home-assistant.io/integrations/broadlink/)). ```yaml -smartir: +infrarize: media_player: - - platform: smartir + - platform: infrarize name: Living room TV unique_id: living_room_tv device_code: 1000 @@ -31,7 +31,7 @@ media_player: ## Example (using xiaomi controller): ```yaml -smartir: +infrarize: remote: - platform: xiaomi_miio @@ -39,7 +39,7 @@ remote: token: YOUR_TOKEN media_player: - - platform: smartir + - platform: infrarize name: Living room TV unique_id: living_room_tv device_code: 2000 @@ -49,10 +49,10 @@ media_player: ## Example (using mqtt controller): ```yaml -smartir: +infrarize: media_player: - - platform: smartir + - platform: infrarize name: Living room TV unique_id: living_room_tv device_code: 3000 @@ -62,10 +62,10 @@ media_player: ## Example (using LOOKin controller): ```yaml -smartir: +infrarize: media_player: - - platform: smartir + - platform: infrarize name: Living room TV unique_id: living_room_tv device_code: 4000 @@ -96,10 +96,10 @@ remote_transmitter: ``` HA configuration.yaml: ```yaml -smartir: +infrarize: media_player: - - platform: smartir + - platform: infrarize name: Living room TV unique_id: living_room_tv device_code: 2000 @@ -112,7 +112,7 @@ Source names in device files are usually set to the name that the media player u ```yaml media_player: - - platform: smartir + - platform: infrarize name: Living room TV unique_id: living_room_tv device_code: 1000 @@ -124,7 +124,7 @@ media_player: ``` ### Changing channels -Most IR remotes can only send one key at a time (0 to 9) to change your TV channel, changing to other channels requires pressing 2 consecutive keys. SmartIR handles any channel for you with the standard Home Assistant service interface. Here is an example that changes your Kitchen TV to channel 51: +Most IR remotes can only send one key at a time (0 to 9) to change your TV channel, changing to other channels requires pressing 2 consecutive keys. Infrarize handles any channel for you with the standard Home Assistant service interface. Here is an example that changes your Kitchen TV to channel 51: ```yaml service: media_player.play_media diff --git a/docs/README.md b/docs/README.md index efbdef4..ba5a711 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,15 +1,13 @@ -[![](https://img.shields.io/github/v/release/kobimx/SmartIR.svg?style=flat-square)](https://github.com/kobimx/SmartIR/releases/latest) [![](https://img.shields.io/badge/HACS-Custom-orange.svg?style=flat-square)](https://github.com/custom-components/hacs) +[![](https://img.shields.io/github/v/release/kobimx/Infrarize.svg?style=flat-square)](https://github.com/kobimx/Infrarize/releases/latest) [![](https://img.shields.io/badge/HACS-Custom-orange.svg?style=flat-square)](https://github.com/custom-components/hacs) -> ### ⚠️ Warning -> You are free to fork, modify, and use the code in this repository in accordance with the applicable open-source license. -> -> **However, the name "SmartIR" must not be used in any capacity**, especially for promoting, rebranding, or distributing your own fork or derivative works. -> -> Please respect this guideline to preserve the original project's identity. +> ### ⚠️ Notice +> This project is a fork of [SmartIR](https://github.com/smartHomeHub/SmartIR), rebranded as **Infrarize** in compliance with the original project's guideline that its name not be used for forks or derivative works. +> +> Full credit to the original SmartIR authors and community for the underlying design and device code database. ## Overview -SmartIR is a custom integration for controlling **climate devices**, **media players**, **fans** and **lights** via infrared controllers.
-SmartIR currently supports the following controllers: +Infrarize is a custom integration for controlling **climate devices**, **media players**, **fans** and **lights** via infrared controllers.
+Infrarize currently supports the following controllers: * [Broadlink](https://www.home-assistant.io/integrations/broadlink/) * [Xiaomi IR Remote (ChuangmiIr)](https://www.home-assistant.io/integrations/remote.xiaomi_miio/) * [LOOK.in Remote](http://look-in.club/devices/remote) @@ -27,7 +25,7 @@ It should look similar to this: ``` / |-- custom_components/ -| |-- smartir/ +| |-- infrarize/ | |-- __init__.py | |-- climate.py | |-- fan.py @@ -37,25 +35,25 @@ It should look similar to this: ``` **(2)** Add the following to your configuration.yaml file. ```yaml -smartir: +infrarize: ``` -SmartIR automatically detects updates after each HA startup and asks you to install them. It also has a mechanism that prevents you from updating if the last SmartIR version is incompatible with your HA instance. You can disable this feature by setting SmartIR as follows: +Infrarize automatically detects updates after each HA startup and asks you to install them. It also has a mechanism that prevents you from updating if the last Infrarize version is incompatible with your HA instance. You can disable this feature by setting Infrarize as follows: ```yaml -smartir: +infrarize: check_updates: false ``` -If you would like to get updates from the rc branch (Release Candidate), configure SmartIR as follows: +If you would like to get updates from the rc branch (Release Candidate), configure Infrarize as follows: ```yaml -smartir: +infrarize: update_branch: rc ``` **(3)** Configure a platform. ### *HACS* -If you want HACS to handle installation and updates, add SmartIR as a [custom repository](https://hacs.xyz/docs/faq/custom_repositories/). In this case, it is recommended that you turn off automatic updates, as above. +If you want HACS to handle installation and updates, add Infrarize as a [custom repository](https://hacs.xyz/docs/faq/custom_repositories/). In this case, it is recommended that you turn off automatic updates, as above.

@@ -68,4 +66,4 @@ Click on the links below for instructions on how to configure each platform.

## See also -* [Discussion about SmartIR Climate (Home Assistant Community)](https://community.home-assistant.io/t/smartir-control-your-climate-tv-and-fan-devices-via-ir-rf-controllers/) +* [Discussion about the original SmartIR project (Home Assistant Community)](https://community.home-assistant.io/t/smartir-control-your-climate-tv-and-fan-devices-via-ir-rf-controllers/) — useful background on climate/TV/fan IR control patterns; not specific to this fork. diff --git a/hacs.json b/hacs.json index 408787c..f5eec63 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { - "name": "SmartIR", + "name": "Infrarize", "homeassistant": "2025.5.0", "persistent_directory": "codes" } diff --git a/tools/build_index.py b/tools/build_index.py index de6be70..8e074c8 100644 --- a/tools/build_index.py +++ b/tools/build_index.py @@ -4,7 +4,7 @@ Run from the repo root: python tools/build_index.py -Outputs: custom_components/smartir/codes_index.json +Outputs: custom_components/infrarize/codes_index.json """ import json import os @@ -16,7 +16,7 @@ _TOOLS_DIR = os.path.dirname(os.path.abspath(__file__)) REPO_ROOT = os.path.dirname(_TOOLS_DIR) CODES_DIR = os.path.join(REPO_ROOT, "codes") OUTPUT_FILE = os.path.join( - REPO_ROOT, "custom_components", "smartir", "codes_index.json" + REPO_ROOT, "custom_components", "infrarize", "codes_index.json" ) diff --git a/tools/smartir_capture.py b/tools/infrarize_capture.py similarity index 98% rename from tools/smartir_capture.py rename to tools/infrarize_capture.py index f65044c..2785451 100644 --- a/tools/smartir_capture.py +++ b/tools/infrarize_capture.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ -SmartIR IR Code Capture Tool -Captures IR codes via zigbee2mqtt (iH-F8260) and builds SmartIR-compatible JSON files. +Infrarize IR Code Capture Tool +Captures IR codes via zigbee2mqtt (iH-F8260) and builds Infrarize-compatible JSON files. Requires: paho-mqtt (pip install paho-mqtt) """ @@ -36,7 +36,7 @@ _SKIPPED = "__skipped__" # --------------------------------------------------------------------------- def gen_temps(min_t: float, max_t: float, precision: float) -> list: - """Generate temperature key strings matching SmartIR JSON format.""" + """Generate temperature key strings matching Infrarize JSON format.""" temps = [] t = min_t while round(t, 6) <= round(max_t, 6): @@ -132,11 +132,11 @@ class _Tooltip: # Main App # --------------------------------------------------------------------------- -class SmartIRCapture(tk.Tk): +class InfrarizeCapture(tk.Tk): def __init__(self): super().__init__() - self.title("SmartIR IR Code Capture") + self.title("Infrarize IR Code Capture") self.geometry("960x700") self.minsize(820, 600) @@ -252,8 +252,8 @@ class SmartIRCapture(tk.Tk): "fan_modes": ( "Fan Modes", "Free-form strings — use any names your remote supports.\n" - "SmartIR passes them through as-is to Home Assistant.\n\n" - "Common values used in existing SmartIR codes:\n" + "Infrarize passes them through as-is to Home Assistant.\n\n" + "Common values used in existing Infrarize codes:\n" " auto — Automatic fan speed\n" " quiet — Quiet / silent\n" " low — Low speed\n" @@ -268,8 +268,8 @@ class SmartIRCapture(tk.Tk): "swing_modes": ( "Swing Modes", "Free-form strings — optional. Leave empty if your remote has no swing.\n" - "SmartIR passes them through as-is to Home Assistant.\n\n" - "Common values used in existing SmartIR codes:\n" + "Infrarize passes them through as-is to Home Assistant.\n\n" + "Common values used in existing Infrarize codes:\n" " auto — Automatic swing\n" " swing — Continuous swing\n" " horizontal — Horizontal vane only\n" @@ -894,7 +894,7 @@ class SmartIRCapture(tk.Tk): combo = self._current_combo() if not combo or not self.pending_code: return - # SmartIR MQTT controller publishes the command string verbatim as payload. + # Infrarize MQTT controller publishes the command string verbatim as payload. # zigbee2mqtt expects {"ir_code_to_send": "..."} on the /set topic. stored = json.dumps({"ir_code_to_send": self.pending_code}) self.session.setdefault("codes", {})[combo_key(combo)] = stored @@ -1082,7 +1082,7 @@ class SmartIRCapture(tk.Tk): def _browse_export_path(self): initial = CODES_DIR if CODES_DIR.exists() else TOOLS_DIR.parent path = filedialog.asksaveasfilename( - title="Export SmartIR JSON", + title="Export Infrarize JSON", initialdir=initial, defaultextension=".json", filetypes=[("JSON", "*.json")], @@ -1237,7 +1237,7 @@ class SmartIRCapture(tk.Tk): # --------------------------------------------------------------------------- def main(): - app = SmartIRCapture() + app = InfrarizeCapture() app.mainloop()