diff --git a/Common/Light Color Mapper/blueprint.yaml b/Common/Light Color Mapper/blueprint.yaml index 317e823..4cfbba1 100644 --- a/Common/Light Color Mapper/blueprint.yaml +++ b/Common/Light Color Mapper/blueprint.yaml @@ -101,6 +101,19 @@ blueprint: max: 255 mode: slider + min_brightness: + name: Minimum Brightness + description: > + Minimum brightness for all lights (1–255). If the sensor or + override brightness is below this value, this minimum is used + instead. Prevents lights from becoming too dim to see. + default: 5 + selector: + number: + min: 1 + max: 255 + mode: slider + none_action: name: When Sensor is Unavailable description: "Action to take when a sensor state is None, unknown, or unavailable." @@ -189,6 +202,7 @@ variables: lights: !input lights max_fps: !input max_fps brightness_override: !input brightness_override + min_brightness: !input min_brightness none_action: !input none_action default_color: !input default_color enable_debug_notifications: !input enable_debug_notifications @@ -222,6 +236,7 @@ action: **Pairs:** {{ pair_count }} **FPS:** {{ max_fps }} **Brightness Override:** {{ brightness_override }} + **Min Brightness:** {{ min_brightness }} **Sensor States:** {% for i in range(pair_count | int) %} @@ -286,7 +301,7 @@ action: entity_id: "{{ current_light }}" data: rgb_color: "{{ default_color }}" - brightness: "{{ brightness_override | int if brightness_override | int > 0 else 255 }}" + brightness: "{{ [brightness_override | int if brightness_override | int > 0 else 255, min_brightness | int] | max }}" # keep_last — do nothing @@ -295,7 +310,7 @@ action: - variables: sensor_rgb: "{{ state_attr(current_sensor, 'rgb_color') | default([255, 255, 255]) }}" sensor_brightness: "{{ state_attr(current_sensor, 'brightness') | default(255) }}" - target_brightness: "{{ brightness_override | int if brightness_override | int > 0 else sensor_brightness | int }}" + target_brightness: "{{ [brightness_override | int if brightness_override | int > 0 else sensor_brightness | int, min_brightness | int] | max }}" - service: light.turn_on target: diff --git a/manifest.json b/manifest.json index 1465fc0..d9f6f21 100644 --- a/manifest.json +++ b/manifest.json @@ -1,3 +1,3 @@ { - "version": "2.2.9" + "version": "2.3.0" }