esphome / esphome/feature-requests
support conditional config
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
**Please describe your use case for this integration and alternatives you've tried:**
**Additional context**
it would be very nice and handy if some parts of config file could be variable based on the condition.
Example:
- my entire package of sensors has default logger level ERROR (so almost nothing on the screen)
- but for some sensors I would like to have DEBUG
- I am thinking this way:
```
logger: !if
condition: ${log_level}
then:
level: ${log_level}
else:
level: ERROR
```
so if log_leve is specified (i.e. DEBUG) my new level = DEBUG, otherwise it is ERROR
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.