actions icon indicating copy to clipboard operation
actions copied to clipboard

hassfest: Collapsible sections giving extra keys not allowed errors

Open Snuffy2 opened this issue 1 year ago • 1 comments

Following the instructions here: https://developers.home-assistant.io/docs/dev_101_services/#service-action-description-example I added a collapsible section to my services. Now hassfest is giving an error saying extra keys are not allowed. However, these are the keys that are listed on the HA site and appear to be working.

PR with error: https://github.com/travisghansen/hass-opnsense/pull/193

Integration opnsense - /github/workspace/custom_components/opnsense:
[64](https://github.com/travisghansen/hass-opnsense/pull/193/checks#step:4:67)
Error: R] [SERVICES] Invalid services.yaml: extra keys not allowed @ data['close_notice']['fields']['multiple_opnsense']['collapsed']. Got True
[65](https://github.com/travisghansen/hass-opnsense/pull/193/checks#step:4:68)
extra keys not allowed @ data['close_notice']['fields']['multiple_opnsense']['fields']. Got {'device_id': {'name': 'OPNsense Device', 'description': 'Select the OPNsense Router to call the command on. If not specified, the command will be sent to all OPNsense Routers.', 'required': False, 'selector': {'device': {'multiple': False, 'filter': [{'integration': 'opnsense'}], 'entity': [{'domain': 'sensor'}]}}}, 'entity_id': {'name': 'OPNsense Entity', 'description': 'Pick any sensor in the OPNsense Router you want to call the command on. If not specified, the command will be sent to all...
[66](https://github.com/travisghansen/hass-opnsense/pull/193/checks#step:4:69)
extra keys not allowed @ data['restart_service']['fields']['multiple_opnsense']['collapsed']. Got True
[67](https://github.com/travisghansen/hass-opnsense/pull/193/checks#step:4:70)
extra keys not allowed @ data['restart_service']['fields']['multiple_opnsense']['fields']. Got {'device_id': {'name': 'OPNsense Device', 'description': 'Select the OPNsense Router to call the command on. If not specified, the command will be sent to all OPNsense Routers.', 'required': False, 'selector': {'device': {'multiple': False, 'filter': [{'integration': 'opnsense'}], 'entity': [{'domain': 'sensor'}]}}}, 'entity_id': {'name': 'OPNsense Entity', 'description': 'Pick any sensor in the OPNsense Router you want to call the command on. If not specified, the command will be sent to all...
[68](https://github.com/travisghansen/hass-opnsense/pull/193/checks#step:4:71)
extra keys not allowed @ data['send_wol']['fields']['multiple_opnsense']['collapsed']. Got True
[69](https://github.com/travisghansen/hass-opnsense/pull/193/checks#step:4:72)
extra keys not allowed @ data['send_wol']['fields']['multiple_opnsense']['fields']. Got {'device_id': {'name': 'OPNsense Device', 'description': 'Select the OPNsense Router to call the command on. If not specified, the command will be sent to all OPNsense Routers.', 'required': False, 'selector': {'device': {'multiple': False, 'filter': [{'integration': 'opnsense'}], 'entity': [{'domain': 'sensor'}]}}}, 'entity_id': {'name': 'OPNsense Entity', 'description': 'Pick any sensor in the OPNsense Router you want to call the command on. If not specified, the command will be sent to all...
[70](https://github.com/travisghansen/hass-opnsense/pull/193/checks#step:4:73)
extra keys not allowed @ data['start_service']['fields']['multiple_opnsense']['collapsed']. Got True
[71](https://github.com/travisghansen/hass-opnsense/pull/193/checks#step:4:74)
extra keys not allowed @ data['start_service']['fields']['multiple_opnsense']['fields']. Got {'device_id': {'name': 'OPNsense Device', 'description': 'Select the OPNsense Router to call the command on. If not specified, the command will be sent to all OPNsense Routers.', 'required': False, 'selector': {'device': {'multiple': False, 'filter': [{'integration': 'opnsense'}], 'entity': [{'domain': 'sensor'}]}}}, 'entity_id': {'name': 'OPNsense Entity', 'description': 'Pick any sensor in the OPNsense Router you want to call the command on. If not specified, the command will be sent to all...
[72](https://github.com/travisghansen/hass-opnsense/pull/193/checks#step:4:75)
extra keys not allowed @ data['stop_service']['fields']['multiple_opnsense']['collapsed']. Got True
[73](https://github.com/travisghansen/hass-opnsense/pull/193/checks#step:4:76)
extra keys not allowed @ data['stop_service']['fields']['multiple_opnsense']['fields']. Got {'device_id': {'name': 'OPNsense Device', 'description': 'Select the OPNsense Router to call the command on. If not specified, the command will be sent to all OPNsense Routers.', 'required': False, 'selector': {'device': {'multiple': False, 'filter': [{'integration': 'opnsense'}], 'entity': [{'domain': 'sensor'}]}}}, 'entity_id': {'name': 'OPNsense Entity', 'description': 'Pick any sensor in the OPNsense Router you want to call the command on. If not specified, the command will be sent to all...
2024-09-17_21-56-25 494

Snuffy2 avatar Sep 18 '24 02:09 Snuffy2

I have the same issue with hassfest validation action. I introduced sections into my services and that work, but hassfest complains about extra keys in services.yaml

Run hassfest validation

Integration anker_solix - /github/workspace/custom_components/anker_solix:
Error: R] [SERVICES] Invalid services.yaml: extra keys not allowed @ data['clear_solarbank_schedule']['fields']['sb2_fields']['collapsed']. Got True
extra keys not allowed @ data['clear_solarbank_schedule']['fields']['sb2_fields']['fields']. Got {'plan': {'required': False, 'example': ['blend_plan'], 'selector': {'select': {'mode': 'list', 'multiple': False, 'translation_key': 'plan', 'options': ['custom_rate_plan', 'blend_plan']}}}, 'week_days': {'required': False, 'example': ['sun'], 'selector': {'select': {'mode': 'list', 'multiple': True, 'translation_key': 'weekday', 'options': ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']}}}}

thomluther avatar Nov 24 '24 11:11 thomluther