I’m working in some yaml that I’ll likely need to replicate on about 50 times (window opener, want one on each window). I feel like there should be a better way than just copy and pasting the same code over and over. What I’d like to be able to do is establish a “baseline” yaml, and then somehow feed it the differences (like names of devices). The idea being if the basic code needs updating one could update them all at once rather than one at a time?
Any ideas?
tom_l
June 24, 2024, 3:49am
2
2 Likes
Exactly what i was looking for, just didn’t have any idea what to search for!
1 Like
tom_l
June 25, 2024, 5:02am
4
Make sure to update ESPHome. There was a fix for packages in 2024.6.2
esphome:dev
← esphome:jesserockz-2024-247
opened 12:03AM - 21 Jun 24 UTC
# What does this implement/fix?
Embarrassingly, the changes I made in #67… 48 were assuming every thing in a list was an object :see_no_evil:
## Types of changes
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
**Related issue or feature (if applicable):** fixes https://github.com/esphome/issues/issues/5907
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>
## Test Environment
- [ ] ESP32
- [ ] ESP32 IDF
- [ ] ESP8266
- [ ] RP2040
- [ ] BK72xx
- [ ] RTL87xx
## Example entry for `config.yaml`:
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR. Furthermore, for new integrations, it gives an impression of how
the configuration would look like.
Note: Remove this section if this PR does not have an example entry.
-->
```yaml
# Example config.yaml
```
## Checklist:
- [ ] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).