NorthernMan54 / homebridge-yamaha-home

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

"zonecontrollersonly_for" Format #44

Closed kcooke315 closed 2 years ago

kcooke315 commented 3 years ago

I'd like to hide Zone2... I've tried the following, but for the life of me, I can't seem to figure out the formatting. Here is my entire config:

{
    "platform": "yamaha-home",
    "manual_addresses": {
        "Yamaha": "192.168.150.26"
    },
    "zonecontrollersonly_for": {
        "Main": "true",
        "Zone2": "false"
    },
    "play_volume": -38,
    "show_input_name": "yes",
    "inputs_as_accessories": {
        "Yamaha": {
            "1": {
                "name": "Set AppleTV",
                "set_scene": "1"
            },
            "2": {
                "name": "Set XBox",
                "set_scene": "2"
            },
            "3": {
                "name": "Set Nintendo",
                "set_scene": "3"
            },
            "4": {
                "name": "Set V-Aux",
                "set_scene": "4"
            }
        }
    }
}
NorthernMan54 commented 3 years ago

1 - You have the parameter specified wrong, it should be "zone_controllers_only_for"

https://github.com/NorthernMan54/homebridge-yamaha-home/blob/c9da861de8e8ca92f46475b7e4c9aa2fc34c92bc/index.js#L72

2 - Structure of the option should be

"zone_controllers_only_for": [ 'Main']

https://github.com/NorthernMan54/homebridge-yamaha-home/blob/c9da861de8e8ca92f46475b7e4c9aa2fc34c92bc/index.js#L249

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes

@francesco-kriegel Did I get that right ?

francesco-kriegel commented 3 years ago

Sorry for my late reply. Your explanation is correct, the value of the field zone_controllers_only_for must be a list if it is present.