You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding switches or other devices their name is not shown correctly. I have found out that if the following is added the name of each accessory will be shown correctly when they are added in HomeKit.
Hi, it was done on purpose, since the name can be set in the config with the "pipe" syntax, but I will check if this option is better for common use case, thanks.
When adding switches or other devices their name is not shown correctly. I have found out that if the following is added the name of each accessory will be shown correctly when they are added in HomeKit.
code lines that could be added:
I added those lines in the function below and it fixed the issue
getSwitchService(harmonyPlatform, accessory, switchName, serviceSubType) {
let service = accessory.getServiceByUUIDAndSubType(switchName, serviceSubType);
if (!service) {
harmonyPlatform.log(
'(' +
harmonyPlatform.name +
')' +
'INFO - Creating Switch Service ' +
switchName +
'/' +
serviceSubType
);
service = new Service.Switch(switchName, 'switchService' + switchName);
service.addOptionalCharacteristic(Characteristic.ConfiguredName);
service.setCharacteristic(Characteristic.ConfiguredName, switchName);
service.subtype = serviceSubType;
accessory.addService(service);
}
return service;
Kind regards
The text was updated successfully, but these errors were encountered: