Skip to content

Commit

Permalink
fix: use model name as fallback if a device has no name
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Nov 18, 2019
1 parent 0a78cf2 commit 381fe29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/iobroker-objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { VirtualGroup } from "./virtual-group";
*/
export function accessoryToCommon(accessory: Accessory): ioBroker.ObjectCommon {
const ret: ioBroker.ObjectCommon = {
name: accessory.name
name: accessory.name || accessory.deviceInfo.modelNumber
};
const icon = getAccessoryIcon(accessory);
if (icon != null) ret.icon = "icons/" + icon;
Expand Down

0 comments on commit 381fe29

Please sign in to comment.