NorthernMan54 / homebridge-yamaha-home

Homebridge plugin for my Yamaha Receiver optimized for use with the Home App and Alexa
27 stars 9 forks source link

New config for renaming zones #56

Open greatestview opened 1 year ago

greatestview commented 1 year ago

Hi @NorthernMan54,

I have an old Yamaha receiver model (RX-V475), which does not allow renaming zones. So when I activate this plugin, my main zone appears as "Main" in Homekit. I know that it’s possible to rename devices in Homekit itself, but there are cases when those name changes get lost, e. g. after rebooting the network. So I was searching for a more permanent solution.

Within this pull request I added a simple optional map config, which allows to specify a custom name for each zone, if provided.

Example config (part):

{ 
    "nozones": false,
    "zone_name_map": {
        "Main": "Yamaha Main"
    },
}

The "Main" zone now appears as "Yamaha Main" inside Homekit. 🥳

Would be glad if you'd merge this pull request, thank you!