mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-16 16:54:04 +02:00
* Implement collapsible sections for options flow Replace single-form options flow with collapsible sections: - Basic options always visible (9 fields) - Advanced options in collapsed section (collapsed by default) - Single form, no multi-step navigation needed Changes: - const.py: Add BASIC_OPTIONS set defining which options are basic - config_flow.py: Use section() from data_entry_flow to wrap advanced options - strings.json: Restructure with sections.advanced for section translations - tests: Update to handle nested section input format * Update README.md, strings.json, and services.yaml * Fix: Use vol.Required for section to render properly * Fix section structure: separate basic and advanced fields in strings.json * Remove accidentally added files * Add local directories to gitignore * Update README.md, strings.json, and services.yaml * Preserve options behavior with collapsible sections * Test serialized advanced options section * fix: preserve config metadata when retrying options * fix: keep options form defaults serializable --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
48 lines
1.9 KiB
JSON
48 lines
1.9 KiB
JSON
{
|
|
"title": "明るさの自動調整",
|
|
"services": {
|
|
"change_switch_settings": {
|
|
"fields": {
|
|
"sunrise_offset": {
|
|
"description": "日の出時間を基準に秒単位で正値もしくは負値で調整する。⏰"
|
|
},
|
|
"only_once": {
|
|
"description": "一度だけ明るさを自動調整するには(`true`)、常に自動調整し続ける場合は(`false`)。"
|
|
},
|
|
"sunset_offset": {
|
|
"description": "日の入時間を基準に秒単位で正値もしくは負値で調整する。⏰"
|
|
},
|
|
"entity_id": {
|
|
"description": "スイッチのエンティティID。 📝"
|
|
}
|
|
}
|
|
},
|
|
"apply": {
|
|
"fields": {
|
|
"lights": {
|
|
"description": "適応する照明(か照明のリスト)の設定。 💡"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"options": {
|
|
"step": {
|
|
"init": {
|
|
"data": {},
|
|
"data_description": {},
|
|
"title": "明るさの自動調整オプション",
|
|
"sections": {
|
|
"advanced": {
|
|
"data": {
|
|
"adapt_only_on_bare_turn_on": "adapt_only_on_bare_turn_on: 最初に照明オンにするとき。`true`を設定すると、AL(適応型照明)は調色や明るさを指定せずや`light.turn_on`をしたときのみ適応します。❌🌈 例えば、適応型照明をシーンを有効にするときにしないようにする。`false`であれば、`service_data`に最初から、ALはシーンの状態に関係なく調色や明るさを適応する。`take_over_control`を有効にすることが必要。🕵️ "
|
|
},
|
|
"data_description": {
|
|
"sunrise_offset": "日の出時間を基準に秒単位で正値もしくは負値で調整する。⏰",
|
|
"sunset_offset": "日の入時間を基準に秒単位で正値もしくは負値で調整する。⏰"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|