diff --git a/.all-contributorsrc b/.all-contributorsrc index 6c825dad..33b875f2 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -440,6 +440,15 @@ "contributions": [ "code" ] + }, + { + "login": "protyposis", + "name": "Mario Guggenberger", + "avatar_url": "https://avatars.githubusercontent.com/u/189372?v=4", + "profile": "http://protyposis.net", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 394acef3..4973849f 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: python-version: ["3.10"] - core-version: ["2023.2.5", "2023.3.6", "2023.4.6", "dev"] + core-version: ["2023.2.5", "2023.3.6", "2023.4.6", "2023.5.2", "dev"] steps: - name: Check out code from GitHub uses: actions/checkout@v3 @@ -54,6 +54,7 @@ jobs: run: | cd core python3 -X dev -m pytest \ + -vvv \ -qq \ --timeout=9 \ --durations=10 \ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 462e0dc2..1dbf741d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.3.2 hooks: - id: pyupgrade args: ["--py39-plus"] diff --git a/README.md b/README.md index 9ba7cc03..1a0830b0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [](https://github.com/hacs/integration)  -[](#contributors-) +[](#contributors-) # π Adaptive Lighting: Enhance Your Home's Atmosphere with Smart, Sun-Synchronized Lighting π @@ -41,27 +41,28 @@ The `adaptive_lighting.manual_control` event is fired when a light is marked as - - [:gear: Configuration](#gear-configuration) - - [:memo: Options](#memo-options) - - [:hammer_and_wrench: Services](#hammer_and_wrench-services) - - [`adaptive_lighting.apply`](#adaptive_lightingapply) - - [`adaptive_lighting.set_manual_control`](#adaptive_lightingset_manual_control) - - [`adaptive_lighting.change_switch_settings`](#adaptive_lightingchange_switch_settings) - - [:robot: Automation examples](#robot-automation-examples) +- [:gear: Configuration](#gear-configuration) + - [:memo: Options](#memo-options) + - [:hammer_and_wrench: Services](#hammer_and_wrench-services) + - [`adaptive_lighting.apply`](#adaptive_lightingapply) + - [`adaptive_lighting.set_manual_control`](#adaptive_lightingset_manual_control) + - [`adaptive_lighting.change_switch_settings`](#adaptive_lightingchange_switch_settings) +- [:robot: Automation examples](#robot-automation-examples) - [Additional Information](#additional-information) - [:sos: Troubleshooting](#sos-troubleshooting) - [:exclamation: Common Problems & Solutions](#exclamation-common-problems--solutions) - [:bulb: Lights Not Responding or Turning On by Themselves](#bulb-lights-not-responding-or-turning-on-by-themselves) - - [:signal_strength: WiFi Networks](#signal_strength-wifi-networks) - - [:spider_web: Zigbee, Z-Wave, and Other Mesh Networks](#spider_web-zigbee-z-wave-and-other-mesh-networks) + - [:signal_strength: WiFi Networks](#signal_strength-wifi-networks) + - [:spider_web: Zigbee, Z-Wave, and Other Mesh Networks](#spider_web-zigbee-z-wave-and-other-mesh-networks) - [:rainbow: Light Colors Not Matching](#rainbow-light-colors-not-matching) - [:bulb: Bulb-Specific Issues](#bulb-bulb-specific-issues) - - [:bar_chart: Graphs!](#bar_chart-graphs) - - [:sunny: Sun Position](#sunny-sun-position) - - [:thermometer: Color Temperature](#thermometer-color-temperature) - - [:high_brightness: Brightness](#high_brightness-brightness) - - [While using `transition_until_sleep: true`](#while-using-transition_until_sleep-true) - - [:busts_in_silhouette: Contributors](#busts_in_silhouette-contributors) +- [:bar_chart: Graphs!](#bar_chart-graphs) + - [:sunny: Sun Position](#sunny-sun-position) + - [:thermometer: Color Temperature](#thermometer-color-temperature) + - [:high_brightness: Brightness](#high_brightness-brightness) + - [While using `transition_until_sleep: true`](#while-using-transition_until_sleep-true) +- [:eyes: See also](#eyes-see-also) +- [:busts_in_silhouette: Contributors](#busts_in_silhouette-contributors) @@ -310,13 +311,13 @@ iphone_carly_wakeup: -# Additional Information +## Additional Information For more details on adding the integration and setting options, refer to the [documentation of the PR](https://deploy-preview-14877--home-assistant-docs.netlify.app/integrations/adaptive_lighting/) and [this video tutorial on Reddit](https://www.reddit.com/r/homeassistant/comments/jabhso/ha_has_it_before_apple_has_even_finished_it_i/). Adaptive Lighting was initially inspired by @claytonjn's [hass-circadian\_lighting](https://github.com/claytonjn/hass-circadian_lighting), but has since been entirely rewritten and expanded with new features. -# :sos: Troubleshooting +## :sos: Troubleshooting Encountering issues? Enable debug logging in your `configuration.yaml`: @@ -329,9 +330,9 @@ logger: After the issue occurs, create a new issue report with the log (`/config/home-assistant.log`). -## :exclamation: Common Problems & Solutions +### :exclamation: Common Problems & Solutions -### :bulb: Lights Not Responding or Turning On by Themselves +#### :bulb: Lights Not Responding or Turning On by Themselves Adaptive Lighting sends more commands to lights than a typical human user would. If your light control network is unhealthy, you may experience: @@ -353,7 +354,7 @@ For most Zigbee networks, **using groups is essential for optimal performance**. As a rule of thumb, if you always control lights together (e.g., bulbs in a ceiling fixture), they should be in a Zigbee group. Expose only the group (not individual bulbs) in Home Assistant Dashboards and external systems like Google Home or Apple HomeKit. -### :rainbow: Light Colors Not Matching +#### :rainbow: Light Colors Not Matching Bulbs from different manufacturers or models may have varying color temperature specifications. For instance, if you have two Adaptive Lighting configurationsβone with only Philips Hue White Ambiance bulbs and another with a mix of Philips Hue White Ambiance and Sengled bulbsβthe Philips Hue bulbs may appear to have different color temperatures despite having identical settings. @@ -362,7 +363,7 @@ To resolve this: 1. Include only bulbs of the same make and model in a single Adaptive Lighting configuration. 2. Rearrange bulbs so that different color temperatures are not visible simultaneously. -### :bulb: Bulb-Specific Issues +#### :bulb: Bulb-Specific Issues Certain bulbs may have issues with long light transition commands: @@ -372,18 +373,23 @@ Certain bulbs may have issues with long light transition commands: ## :bar_chart: Graphs! These graphs were generated using the values calculated by the Adaptive Lighting sensor/switch(es). -#### :sunny: Sun Position +### :sunny: Sun Position  -#### :thermometer: Color Temperature +### :thermometer: Color Temperature  -#### :high_brightness: Brightness +### :high_brightness: Brightness  -#### While using `transition_until_sleep: true` +### While using `transition_until_sleep: true`  +## :eyes: See also + +- [*Sleep better with Adaptive Lighting in Home Assistant*](https://wartner.io/sleep-better-with-adaptive-lightning-in-home-assistant/) by Florian Wartner on 2023-02-23 (blog post π) +- [*Automatic smart light brightness and color based on the sun*](https://www.youtube.com/watch?v=Rg3zI1Oyk3c) by Home Automation Guy on 2022-08-31 (YouTube video πΊ) +- [*Adaptive Lighting Blew My Mind in Home Assistant - How to set it up*](https://www.youtube.com/watch?v=c1cnccmgl3k) by Smart Home Junkie on 2022-06-26 (YouTube video πΊ) ## :busts_in_silhouette: Contributors @@ -423,6 +429,7 @@ These graphs were generated using the values calculated by the Adaptive Lighting