0.56.0 - BREAKING: Threshold property now an array for more flexibility - can control border color
Sometimes we outgrow our old shoes—they were comfortable, but they don't fit anymore.
Sorry for the growing pains! 💚
Breaking Change: Threshold Configuration Format
Overview
The threshold configuration format has been updated to use arrays, allowing for more flexible configuration with multiple threshold entries per sensor type. This is a breaking change that requires updating your configuration files.
The card will throw a console error and not display with the old format so that you know it needs to be updated.
The editor configuration for climate thresholds has moved to "Alarm" tab.
What Changed
Old Format:
thresholds:
temperature: 75
humidity: 55
temperature_entity: sensor.living_room_temp
humidity_entity: sensor.living_room_humidity
temperature_operator: gt
humidity_operator: gtNew Format:
thresholds:
temperature:
- entity_id: sensor.living_room_temp
value: 75
operator: gt
humidity:
- entity_id: sensor.living_room_humidity
value: 55
operator: gtMigration Guide
Simple Migration (Single Threshold)
Before:
thresholds:
temperature: 75
humidity: 55After:
thresholds:
temperature:
- value: 75 # Uses averaged temperature sensor automatically
humidity:
- value: 55 # Uses averaged humidity sensor automaticallyNote: For simple cases, you don't need to specify entity_id. The card will automatically use the averaged sensor value for temperature or humidity. Only specify entity_id if you need to check a specific sensor instead of the average.
Migration with Operators
Before:
thresholds:
temperature: 68
temperature_operator: lt
humidity: 30
humidity_operator: ltAfter:
thresholds:
temperature:
- value: 68
operator: lt # Uses averaged temperature sensor
humidity:
- value: 30
operator: lt # Uses averaged humidity sensorMigration with Entity-Specific Thresholds
Before:
thresholds:
temperature: 75
temperature_entity: sensor.living_room_temp
humidity: 55
humidity_entity: sensor.living_room_humidityAfter:
thresholds:
temperature:
- entity_id: sensor.living_room_temp
value: 75
humidity:
- entity_id: sensor.living_room_humidity
value: 55Migration with Dynamic Threshold Values
Before:
thresholds:
temperature: sensor.temperature_threshold
humidity: sensor.humidity_thresholdAfter:
thresholds:
temperature:
- value: sensor.temperature_threshold # Entity ID for dynamic threshold
# Uses averaged temperature sensor by default
humidity:
- value: sensor.humidity_threshold # Entity ID for dynamic threshold
# Uses averaged humidity sensor by defaultNote: If you need to check a specific sensor instead of the average, add entity_id to the threshold entry.
Multiple thresholds feature
With the new format, you can now configure multiple threshold entries for the same sensor type:
thresholds:
temperature:
- value: 75 # Uses averaged temperature sensor
operator: gt
- entity_id: sensor.bedroom_temp # Check specific sensor
value: 70
operator: gt
humidity:
- value: 80 # Uses averaged humidity sensor
operator: lt
- value: 20 # Uses averaged humidity sensor
operator: gtThis allows you to:
- Monitor multiple sensors with different thresholds
- Set different thresholds for the same sensor (e.g., too high and too low)
- Use different operators for different sensors
Field Descriptions
entity_id(optional): The sensor entity ID to check for this threshold. If omitted, uses the averaged sensor value for the device class (temperature or humidity)value(optional): The threshold value (number) or entity ID (string) to lookup threshold value from. Defaults to 80°F (26.7°C) for temperature, 60% for humidityoperator(optional): Comparison operator (gt,gte,lt,lte,eq). Defaults togtcolor(optional): Custom border color when threshold is triggered. Accepts any CSS color value. Defaults to red (var(--error-color)) for temperature, blue (var(--info-color)) for humidity
Notes
- The
moldthreshold remains unchanged and still uses a simple number value - Default operators remain
gt(greater than) if not specified - Dynamic threshold values (using entity IDs) are still supported via the
valuefield
Impact
- Breaking Change: All existing threshold configurations must be updated
- No Automatic Migration: The old format will not work and must be manually updated
- Editor Support: The card editor has been updated to support the new format
Questions?
If you need help migrating your configuration, please refer to the Threshold Configuration Documentation or open an issue on GitHub.
Threshold Border color control
Custom Threshold Border Colors
You can now customize the border color when climate thresholds are triggered! This allows you to use different colors for different threshold ranges and better match your dashboard theme.
Example: Basement Temperature Monitoring
thresholds:
temperature:
- value: 70
operator: lt
color: blue # Blue border when temperature is below 70°F
- value: 85
operator: gt
color: red # Red border when temperature is above 85°FExample: Multi-Level Humidity Alerts
thresholds:
humidity:
- value: 30
operator: lt
color: orange # Orange warning when humidity is too low (< 30%)
- value: 70
operator: gt
color: purple # Purple alert when humidity is too high (> 70%)Features:
- Accepts any CSS color value (hex, rgb, named colors, CSS variables)
- If omitted, uses default colors: red for temperature, blue for humidity
- Works with all comparison operators (
gt,gte,lt,lte,eq) - Perfect for distinguishing between different severity levels or use cases
For more examples and details, see the Threshold Configuration Documentation.
- chore: bumps version to 0.56.0 by @gh-action-bump-version
- control climate threshold border color - thanks @a0365d9b! by @warmfire540
- editor for new thresholds by @warmfire540
- breaking: temperature and humidity threshold now an array by @warmfire540
- chore: yarn (deps-dev): bump prettier in the all-dependencies group (#295) by @dependabot[bot]
What's Changed
- chore: yarn (deps-dev): bump prettier from 3.6.2 to 3.7.3 in the all-dependencies group by @dependabot[bot] in #295
- BREAKING: Threshold property now an array for more flexibility - can control border color by @warmfire540 in #297
Full Changelog: 0.55.0...0.56.0