Skip to content

Commit 22f5ef5

Browse files
committed
Merge branch 'dev'
2 parents c9dea23 + 1d032ce commit 22f5ef5

12 files changed

Lines changed: 111 additions & 34 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# Recalbox Home Assistant integration - Changelog
22

3-
> By Aurélien Tomassini, 2026.
3+
> By Recalbox, 2026.
44
55

6-
## v1.5.6 - 09/02/2025 - Network stability + UX improvement + Support HA 2026.2
6+
## v1.6.0 - 09/02/2026 - Configurable entities and Migrate to Recalbox
7+
8+
9+
- Move Recalbox parameter entities to editable `Configuration` instead of `Diagnostic` section
10+
- Update docs to new Recalbox repository !
11+
12+
13+
## v1.5.6 - 09/02/2026 - Network stability + UX improvement + Support HA 2026.2
714

815

916
- When pulling game info from API, set game attributes only if "Action"=="rungame", else, we only use the system data (no game running).
@@ -16,13 +23,13 @@
1623
- Re-enable option to force or not IPv4
1724

1825

19-
## v1.5.5 - 08/02/2025
26+
## v1.5.5 - 08/02/2026
2027

2128
- Force not using DNS cache on `aiohttp`, because its mDNS resolution is not stable with
2229
`.local`-suffixed host.
2330

2431

25-
## v1.5.4 - 07/02/2025
32+
## v1.5.4 - 07/02/2026
2633

2734

2835
- Add option to force IP v4 on mDNS or not

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Recalbox Home Assistant integration
22

3-
<small>By Aurélien Tomassini, 2026</small>
3+
<small>By Recalbox, 2026</small>
44

55
🇺🇸 English version
66
[🇫🇷 Ouvrir la version Française](README_fr.md)
@@ -126,8 +126,8 @@ It uses the same services just listed.
126126
- If not installed yet, [install HACS](https://www.hacs.xyz/docs/use/download/download/)
127127

128128
- Install this repository via this button :
129-
[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=ooree23&repository=RecalboxHomeAssistant&category=integration)
130-
> Or manually, add `https://github.com/ooree23/RecalboxHomeAssistant` as repository, as Integration.
129+
[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=recalbox&repository=RecalboxHomeAssistant&category=integration)
130+
> Or manually, add `https://github.com/recalbox/RecalboxHomeAssistant` as repository, as Integration.
131131
Press download, and then accept to restart.
132132

133133
It will automatically add Recalbox integration to your Home Assistant

README_fr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Intégration Recalbox Home Assistant
22

3-
<small>Par Aurélien Tomassini, 2026</small>
3+
<small>Par Recalbox, 2026</small>
44

55
🇫🇷 Version Française
66
[🇺🇸 Go to English version](README.md)
@@ -126,8 +126,8 @@ lancées par Assist utilisent les mêmes commandes que listées ci-dessus.
126126
- Si vous ne l'avez pas encore, [installez HACS](https://www.hacs.xyz/docs/use/download/download/)
127127

128128
- Installez cette **intégration Recalbox** via ce bouton :
129-
[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=ooree23&repository=RecalboxHomeAssistant&category=integration)
130-
> Ou manuellement, ajoutez `https://github.com/ooree23/RecalboxHomeAssistant` comme dépôt, de type Integration.
129+
[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=recalbox&repository=RecalboxHomeAssistant&category=integration)
130+
> Ou manuellement, ajoutez `https://github.com/recalbox/RecalboxHomeAssistant` comme dépôt, de type Integration.
131131
Cliquez sur télécharger, et acceptez de redémarrer.
132132

133133
Cela ajoutera l'intégration Recalbox dans votre Home Assistant

Recalbox/userscripts/home_assistant_notifier.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# A placer dans le dossier userscripts
55
# Par Aurélien Tomassini
66

7-
SCRIPT_VERSION="home_assistant_notifier.sh:v1.5.6"
7+
SCRIPT_VERSION="home_assistant_notifier.sh:v1.6.0"
88

99
# Configuration
1010
HOME_ASSISTANT_DOMAIN="homeassistant.local"

custom_components/recalbox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import hashlib
2020

2121
_LOGGER = logging.getLogger(__name__)
22-
PLATFORMS = ["switch", "sensor"]
22+
PLATFORMS = ["switch", "sensor", "number"]
2323

2424

2525
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

custom_components/recalbox/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
{
66
"name": "Recalbox Card",
77
"filename": "recalbox-card.js",
8-
"version": "1.5.6",
8+
"version": "1.6.0",
99
},
1010
]

custom_components/recalbox/frontend/recalbox-card.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ class RecalboxCard extends HTMLElement {
367367
<br>
368368
<span ${!isOn || isKodiRunning ? 'style="display:none;"' : ''}><a href="http://${host}" target="_blank">${i18n.footer.webManagerLabel}</a> &nbsp; | &nbsp;</span>
369369
<a href="https://www.recalbox.com" target="_blank">Recalbox.com</a> &nbsp; | &nbsp;
370-
<!-- <a href="https://github.com/ooree23/RecalboxHomeAssistant" target="_blank">${i18n.footer.integrationLabel}</a> &nbsp; | &nbsp; -->
371-
<a href="https://ooree23.github.io/RecalboxHomeAssistant/" target="_blank">${i18n.footer.integrationLabel}</a>
370+
<!-- <a href="https://github.com/recalbox/RecalboxHomeAssistant" target="_blank">${i18n.footer.integrationLabel}</a> &nbsp; | &nbsp; -->
371+
<a href="https://recalbox.github.io/RecalboxHomeAssistant/" target="_blank">${i18n.footer.integrationLabel}</a>
372372
</div>
373373
`;
374374
}

custom_components/recalbox/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"integration_type": "hub",
66
"dependencies": ["frontend", "http", "api"],
77
"iot_class": "local_push",
8-
"version": "1.5.6",
8+
"version": "1.6.0",
99
"codeowners": ["@ooree23", "@recalbox"],
10-
"documentation": "https://github.com/ooree23/RecalboxHomeAssistant",
11-
"issue_tracker": "https://github.com/ooree23/RecalboxHomeAssistant/issues"
10+
"documentation": "https://github.com/recalbox/RecalboxHomeAssistant",
11+
"issue_tracker": "https://github.com/recalbox/RecalboxHomeAssistant/issues"
1212
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
from homeassistant.components.number import NumberEntity
2+
from homeassistant.helpers.entity import EntityCategory
3+
from .const import DOMAIN
4+
5+
async def async_setup_entry(hass, config_entry, async_add_entities):
6+
entities = [
7+
RecalboxPortNumber(hass, config_entry, "api_port_os", "Port API OS", "mdi:api", 80),
8+
RecalboxPortNumber(hass, config_entry, "api_port_gamesmanager", "Port API Games", "mdi:api", 81),
9+
RecalboxPortNumber(hass, config_entry, "udp_recalbox", "Port UDP Recalbox", "mdi:remote", 1337),
10+
RecalboxPortNumber(hass, config_entry, "udp_retroarch", "Port UDP RetroArch", "mdi:remote", 55355),
11+
RecalboxPortNumber(hass, config_entry, "api_port_kodi", "Port API Kodi", "mdi:kodi", 8081),
12+
]
13+
async_add_entities(entities)
14+
15+
class RecalboxPortNumber(NumberEntity):
16+
_attr_entity_category = EntityCategory.CONFIG
17+
_attr_has_entity_name = True
18+
_attr_native_min_value = 1
19+
_attr_native_max_value = 65535
20+
_attr_native_step = 1
21+
22+
def __init__(self, hass, config_entry, key, name, icon, defaultValue):
23+
self.hass = hass
24+
self._config_entry = config_entry
25+
self._key = key
26+
self._attr_name = name
27+
self._attr_icon = icon
28+
self._attr_unique_id = f"{config_entry.entry_id}_port_{key}"
29+
self._default = defaultValue
30+
31+
@property
32+
def native_value(self):
33+
return self._config_entry.options.get(self._key, self._default)
34+
35+
async def async_set_native_value(self, value: float):
36+
new_options = dict(self._config_entry.options)
37+
new_options[self._key] = int(value)
38+
self.hass.config_entries.async_update_entry(self._config_entry, options=new_options)
39+
40+
@property
41+
def device_info(self):
42+
return {"identifiers": {(DOMAIN, self._config_entry.entry_id)}}

custom_components/recalbox/sensor.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
99
# On crée une liste d'entités à ajouter
1010
entities = [
1111
RecalboxDiagnosticSensor(config_entry, "host", "Host", "mdi:ip-network"),
12-
RecalboxDiagnosticSensor(config_entry, "api_port_os", "Port API OS", "mdi:api", 80),
13-
RecalboxDiagnosticSensor(config_entry, "api_port_gamesmanager", "Port API Games", "mdi:api", 81),
14-
RecalboxDiagnosticSensor(config_entry, "udp_recalbox", "Port UDP Recalbox", "mdi:remote", 1337),
15-
RecalboxDiagnosticSensor(config_entry, "udp_retroarch", "Port UDP RetroArch", "mdi:remote", 55355),
16-
RecalboxDiagnosticSensor(config_entry, "api_port_kodi", "Port API Kodi", "mdi:kodi", 8081),
17-
RecalboxDiagnosticSensor(config_entry, "only_ip_v4", "Force mDNS IP v4 only", "mdi:dns", True),
1812
]
1913
async_add_entities(entities)
2014

@@ -31,7 +25,7 @@ def __init__(self, config_entry, key, name, icon, default=None):
3125
self._attr_icon = icon
3226
self._default = default
3327
# L'ID unique doit être différent pour chaque port
34-
self._attr_unique_id = f"{config_entry.entry_id}_{key}"
28+
self._attr_unique_id = f"{config_entry.entry_id}_config_{key}"
3529

3630
@property
3731
def native_value(self):

0 commit comments

Comments
 (0)