From 2bcc7ae4d6a0c9533d004f2dc54321373b431464 Mon Sep 17 00:00:00 2001 From: Maurice Makaay Date: Thu, 13 May 2021 18:43:56 +0200 Subject: [PATCH] Moved example.yaml to the root dir, in line with the recommendations from the ESPHome external components guide. --- CHANGELOG.md | 10 +++++++++- README.md | 2 +- doc/configuration.md | 8 ++++---- doc/installation.md | 2 +- doc/testplan.md | 2 +- doc/example.yaml => example.yaml | 2 +- 6 files changed, 17 insertions(+), 9 deletions(-) rename doc/example.yaml => example.yaml (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 413d2c6..e149194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Changed +- The GitHub repository structure has been updated, in order to make it compatible with + the new `external_components` feature of ESPHome v1.18.0. From now on, the code from this + repository no longer has to be downloaded and installed manually. The `example.yaml` has + been updated for using this new feature. - A fix has been implemented to prevent the lamp from being disconnected from Home Assistant a lot (resulting in the lamp becoming unavailable). Fixes [issue #19](https://github.com/mmakaay/esphome-xiaomi_bslamp2/issues/19). - ESPHome v?.?.? or higher is required for making this fix work. + ESPHome v1.18.0 or higher is required for making this fix work. - Transitions are now fully suppressed when in night light mode. In that mode, LED output levels are too low for producing good looking transitions. Fixes [issue #10](https://github.com/mmakaay/esphome-xiaomi_bslamp2/issues/10). @@ -20,6 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - New documentation section: Technical details (it's all about the internals) +### Removed +- The known issue documentation page has been removed, now we have a fix for the disconnect issues + in ESPHome v1.18.0. + ## [1.0.0-RC1] ### Changed - The documentation has been restructured. diff --git a/README.md b/README.md index 588f2ba..078bd3b 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ aspect of the lamp and to integrate the lamp in your Home Assistant setup. For those who have experience with flashing ESPHome onto devices: * Make sure you are using ESPHome 1.18.0 or newer. -* Copy `[doc/example.yaml](doc/example.yaml)` to `/.yaml`. +* Copy `[example.yaml](example.yaml)` to `/.yaml`. * Modify the configuration to your needs (see the [configuration guide](doc/configuration.md)). * Compile the `firmware.bin` file and download it to the device to which you have connected your serial to USB adapter. diff --git a/doc/configuration.md b/doc/configuration.md index d0497c0..b3bb6f1 100644 --- a/doc/configuration.md +++ b/doc/configuration.md @@ -3,7 +3,7 @@ # Configuration guide I think, the best starting point for creating your own yaml configuration, is to look at the -[example.yaml](example.yaml) file from the project documentation. This configuration was written +[example.yaml](../example.yaml) file from the project documentation. This configuration was written with the functionality of the original firmware in mind and it makes use of all available options. This configuration guide can be used to fill in the blanks. @@ -33,7 +33,7 @@ I do mention the platform configuration here for completeness sake, but **genera to add the following configuration option to your yaml file**. It is loaded automatically by the components that need it, and the GPIO + I2C configurations are fully prepared to work for the Bedside Lamp 2 wiring out of the box. Therefore, you will not find this piece of configuration in -the [example.yaml](example.yaml). +the [example.yaml](../example.yaml). Having said that, here are the configuration options: @@ -126,7 +126,7 @@ mode. In this ESPHome firmware, setting the brightness to its lowest value trigg mode. This makes things a lot easier to control. It is possible to control the night light mode separately. An example of this can be found in the -[example.yaml](example.yaml), in which holding the power button is bound to activating the night +[example.yaml](../example.yaml), in which holding the power button is bound to activating the night light. ### light.disco_on Action @@ -169,7 +169,7 @@ switch to the next preset within the active preset group. The same button can be while, to switch to the other preset group. In your light configuration, you can mimic this behavior (in fact: it is done so in the -[example.yaml](example.yaml)) by means of the presets system. This system consists of two parts: +[example.yaml](../example.yaml)) by means of the presets system. This system consists of two parts: * Defining presets * Activating presets from automations diff --git a/doc/installation.md b/doc/installation.md index 9541376..e84d753 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -12,7 +12,7 @@ the code manually. This leverages the external components feature that was intro version 1.18.0. Therefore, you must use ESPHome version 1.18.0 or later. Before you can compile the firmware, you will have to create the YAML configuration file for your -device. You can take the [example.yaml](example.yaml) from this repository as a starting point, and +device. You can take the [example.yaml](../example.yaml) from this repository as a starting point, and modify that one to your needs. Detailed information about the YAML configuration options can be found in the [Configuration guide](configuration.md). diff --git a/doc/testplan.md b/doc/testplan.md index b50d4ac..715ed20 100644 --- a/doc/testplan.md +++ b/doc/testplan.md @@ -13,7 +13,7 @@ been introduced. * Remove the cached framework package: `/bin/rm -fR ~/.platformio/packages/framework-arduinoespressif32` -* Copy `doc/example.yaml` to a clean build directory, and update the first two sections for the +* Copy `[example.yaml](../example.yaml)` to a clean build directory, and update the first two sections for the local setup (substitutions, wifi, api, ota). * Use `esphome example.yaml compile` to build the code. diff --git a/doc/example.yaml b/example.yaml similarity index 99% rename from doc/example.yaml rename to example.yaml index dc5167f..7f5cf14 100644 --- a/doc/example.yaml +++ b/example.yaml @@ -59,7 +59,7 @@ logger: external_components: - source: type: git - url: https://github.com/mmakaay/xiaomi_bslamp2 + url: https://github.com/mmakaay/esphome-xiaomi_bslamp2 ref: main # A special platform package is used for enabling unicore and disabling the