Tanh and Linear modes remain at min_brightness forever if it is higher than max_brightness (inverted timescale)
kind/bugkind/featureneed/triage
# Home Assistant Adaptive Lighting Issue Template
## Bug Reports
If you need help with using or configuring Adaptive Lighting, please [open a Q&A discussion thread here](https://github.com/basnijholt/adaptive-lighting/discussions/new?category=q-a) instead.
### Before submitting a bug report, please follow these troubleshooting steps:
Please confirm that you have completed the following steps:
- [x] I have updated to the [latest Adaptive Lighting version](https://github.com/basnijholt/adaptive-lighting/releases) available in [HACS](https://hacs.xyz/).
- [x] I have reviewed the [Troubleshooting Section](https://github.com/basnijholt/adaptive-lighting#sos-troubleshooting) in the [README](https://github.com/basnijholt/adaptive-lighting#readme).
- [ ] (If using Zigbee2MQTT) I have read the [Zigbee2MQTT troubleshooting guide](https://github.com/basnijholt/adaptive-lighting#zigbee2mqtt) in the [README](https://github.com/basnijholt/adaptive-lighting#readme). - **_Not Applicable_**
- [x] I have checked the [V2 Roadmap](https://github.com/basnijholt/adaptive-lighting/discussions/291) and [open issues](https://github.com/basnijholt/adaptive-lighting/issues) to ensure my issue isn't a duplicate.
Note: https://github.com/basnijholt/adaptive-lighting/issues/88 *could* be considered a duplicate, depending on how you categorize my use case compared to theirs. I believe this to be a distinct behaviour, but if maintainers prefer I can move over there instead.
### Required information for bug reports:
Please include the following information in your issue.
*Issues missing this information may not be addressed.*
1. **Debug logs** captured while the issue occurred. [See here for instructions on enabling debug logging](https://github.com/basnijholt/adaptive-lighting#troubleshooting):
Debug logs won't really help here - there's no logging of an unimplemented feature being unimplemented.
2. [Your Adaptive Lighting configuration](https://github.com/basnijholt/adaptive-lighting#gear-configuration):
```
adaptive_lighting:
- name: "Master Bedroom"
... (This config is fine, and omitted to simplify reading.)
- name: "Porch/Patio Lights"
lights:
- light.hue_filament_bulb_frontdoor
- light.hue_color_lamp_1
# --- Core circadian color range ---
min_color_temp: 3200 # Very warm at night / early morning
max_color_temp: 1800 # Cool daylight without harsh blue
# --- Brightness limits ---
min_brightness: 100 # Avoid full blackout when on
max_brightness: 15
# --- Brightness curve ---
brightness_mode: tanh
brightness_mode_time_dark: 1800 # 30 min ramp around sunset
brightness_mode_time_light: 1800 # 30 min ramp around sunrise
# --- Sunrise / sunset tracking ---
# Track real sun, but prevent pathological extremes
sunrise_offset: 3600 # Set Ramp to 1 hour after Sunrise.
sunset_offset: -3600 # Set Ramp to 1 hour before Sunset.
# --- Control & override behaviour ---
take_over_control: true
take_over_control_mode: pause_changed
autoreset_control_seconds: 1800 # Resume adaptation after 30 min
# --- Quality-of-life ---
adapt_only_on_bare_turn_on: false
skip_redundant_commands: true
intercept: true
multi_light_intercept: true
```
```
4. Describe the bug and how to reproduce it:
When Min_Brightness is set above max_brightness, to create an inverted timescale, the linear and tanh modes do not properly accomodate these settings, while the default mode does (but its curve is very suboptimal for this case.)
5. Steps to reproduce the behavior:
Set min_brightness higher than max_brightness, and observe that the brightness never changes,
0 条评论