Commit graph

303 commits

Author SHA1 Message Date
Julian Pawlowski
532a91be58 fix(translations): resolve hassfest selector key validation errors
Changed all selector option keys from uppercase to lowercase to comply
with Home Assistant's hassfest validation pattern [a-z0-9-_]+.

Fixed inconsistency in PEAK_PRICE_MIN_LEVEL_OPTIONS where some values
were uppercase while others were lowercase.

Changes:
- translations/*.json: All selector keys now lowercase (volatility, price_level)
- const.py: Added .lower() to all PEAK_PRICE_MIN_LEVEL_OPTIONS values
- binary_sensor.py: Added .upper() conversion when looking up price levels
  in PRICE_LEVEL_MAPPING to handle lowercase config values

Impact: Config flow now works correctly with translated selector options.
Hassfest validation passes without selector key errors.
2025-11-09 15:31:37 +00:00
Julian Pawlowski
f4568be34e feat(sensors): add price volatility analysis and period filters
Added comprehensive volatility analysis system:
- 4 new volatility sensors (today, tomorrow, next_24h, today+tomorrow)
- Volatility classification (LOW/MODERATE/HIGH/VERY HIGH) based on price spread
- Configurable thresholds in options flow (step 6 of 6)
- Best/Peak price period filters using volatility and price level
- Price spread calculation in get_price service

Volatility sensors help users decide if price-based optimization is worthwhile.
For example, battery optimization only makes sense when volatility ≥ MODERATE.

Period filters allow AND-logic combinations:
- best_price_min_volatility: Only show cheap periods on volatile days
- best_price_max_level: Only show periods when prices reach desired level
- peak_price_min_volatility: Only show peaks on volatile days
- peak_price_min_level: Only show peaks when expensive levels occur

All 5 language files updated (de, en, nb, nl, sv) with:
- Volatility sensor translations (name, states, descriptions)
- Config flow step 6 "Volatility" with threshold settings
- Step progress indicators added to all config steps
- Period filter translations with usage tips

Impact: Users can now assess daily price volatility and configure period
sensors to only activate when conditions justify battery cycling or load
shifting. Reduces unnecessary battery wear on low-volatility days.
2025-11-09 14:24:34 +00:00
Julian Pawlowski
32e429624e refactor: Adjust suggested display precision for future average price sensors and add timestamp attributes for next average calculations 2025-11-08 17:06:19 +00:00
Julian Pawlowski
ac100216ee refactor: Update attribute naming and ordering for clarity and consistency 2025-11-08 16:50:55 +00:00
Julian Pawlowski
db0d65a939 feat: Add price trend thresholds configuration and update related calculations 2025-11-08 16:02:21 +00:00
Julian Pawlowski
5ba0633d15 refactor: Store trend attributes in a sensor-specific dictionary for better organization 2025-11-08 15:30:55 +00:00
Julian Pawlowski
f9f4908748 refactor: Enhance period calculations with aggregated levels and ratings 2025-11-08 15:01:25 +00:00
Julian Pawlowski
db3299b7a7 Add period calculation for best and peak prices
- Introduced a new utility module `period_utils.py` for calculating price periods.
- Implemented `_get_period_config` method to retrieve configuration for best and peak price calculations.
- Added `_calculate_periods_for_price_info` method to compute best and peak price periods based on price data.
- Enhanced `TibberPricesDataUpdateCoordinator` to include calculated periods in the data transformation methods.
- Updated configuration constants for best and peak price settings.
2025-11-08 14:26:46 +00:00
Julian Pawlowski
3f3edd8a28 refactor: Update price level and rating options to inline definitions for sensor initialization 2025-11-08 09:24:28 +00:00
Julian Pawlowski
9c6ebc45ec chore: Bump version to 0.2.0 2025-11-07 23:45:28 +00:00
Julian Pawlowski
df9fb37fe4 refactor: Update integration version handling in TibberPrices components 2025-11-07 23:43:39 +00:00
Julian Pawlowski
3df68db20b refactor: Update interval attribute keys and improve period merging logic in TibberPricesBinarySensor 2025-11-07 23:31:29 +00:00
Julian Pawlowski
ca88f136c3 feat: Implement time-sensitive updates for Tibber price sensors and binary sensors 2025-11-07 21:02:11 +00:00
Julian Pawlowski
1ed2c08f34 feat: Add minimum period length configuration for best and peak price sensors 2025-11-07 15:16:16 +00:00
Julian Pawlowski
f4ae8422f2 fix: Update trend percentage attribute key format in TibberPricesSensor 2025-11-07 14:49:36 +00:00
Julian Pawlowski
19063daa72 fix: Remove unused model_id attribute from TibberPricesEntity 2025-11-07 14:45:33 +00:00
Julian Pawlowski
40852b7d84 fix: Update reauthentication titles for Tibber Price integration in multiple languages 2025-11-07 11:13:42 +00:00
Julian Pawlowski
5e0a297a8f Update Dutch and Swedish translations for Tibber Prices integration
- Revised various phrases for clarity and consistency in Dutch (nl.json) and Swedish (sv.json) translations.
- Changed terms from "woning" to "huis" in Dutch for better contextual accuracy.
- Improved readability and grammatical correctness in both languages.
- Ensured all user-facing strings are updated to reflect the latest terminology and phrasing.
2025-11-06 22:53:20 +00:00
Julian Pawlowski
ef1a81ccc1 Refactor translations for electricity prices in multiple languages
- Updated keys from "cents" to more user-friendly terms for current, next, and previous prices.
- Added state descriptions for price levels and ratings, including categories like "very cheap," "cheap," "normal," "expensive," and "very expensive."
- Introduced new average price sensors for the next 1 to 12 hours.
- Added price trend sensors for 1 to 12 hours with states indicating rising, falling, or stable trends.
- Ensured consistency in naming conventions across English, Norwegian, Dutch, and Swedish translations.
2025-11-06 22:36:12 +00:00
Julian Pawlowski
76e5a0fc58 feat: Add function to calculate average price for the next N hours 2025-11-06 22:35:53 +00:00
Julian Pawlowski
4d77d6d824 fix: Change integration type from service to hub in manifest.json 2025-11-06 17:04:10 +00:00
Julian Pawlowski
433558f60b feat: Implement reauthentication flow 2025-11-06 16:59:41 +00:00
Julian Pawlowski
3ef588b1f4 fix: Update German translations for peak and best price period labels 2025-11-06 16:01:41 +00:00
Julian Pawlowski
96df4882e0 Add Norwegian, Dutch, and Swedish translations for Tibber Prices integration 2025-11-06 12:03:03 +00:00
Julian Pawlowski
63904fff39 feat: Enhance Tibber Prices integration with new configuration options and improved data handling
- Added new configuration options for minimum distance from average price for best and peak prices.
- Updated default values for best and peak price flexibility.
- Improved coordinator to handle midnight turnover and data rotation more effectively.
- Refactored entity initialization to streamline device information retrieval.
- Updated sensor attributes to use more descriptive names for price values.
- Enhanced translations for new configuration options in English and German.
- Improved unit tests for coordinator functionality, ensuring proper cleanup and async handling.
2025-11-06 11:43:22 +00:00
Julian Pawlowski
f7991ae71c fix 2025-11-03 22:26:51 +00:00
Julian Pawlowski
af3e112c99 update translations 2025-11-03 22:11:19 +00:00
Julian Pawlowski
17a20fbb39 update default values 2025-11-03 22:04:14 +00:00
Julian Pawlowski
2f7b48e177 update currency 2025-11-03 21:31:38 +00:00
Julian Pawlowski
8790ac8a41 fix 2025-11-03 21:13:50 +00:00
Julian Pawlowski
bba5f180b0 add lots of new sensors 2025-11-03 20:55:28 +00:00
Julian Pawlowski
6040a19136 update dev environment 2025-11-03 15:54:01 +00:00
Julian Pawlowski
5ee780da87 update translations 2025-11-03 09:53:19 +00:00
Julian Pawlowski
02adf47faf fix translations 2025-11-03 00:47:50 +00:00
Julian Pawlowski
a4a8fc5707 fix manifest order 2025-11-03 00:47:45 +00:00
Julian Pawlowski
d749016f3a fix sorting order 2025-11-03 00:44:25 +00:00
Julian Pawlowski
a0700790ed fix manifest 2025-11-03 00:38:19 +00:00
Julian Pawlowski
79556768cc fix linting errors 2025-11-03 00:32:27 +00:00
Julian Pawlowski
d3c91e162a fix 2025-11-03 00:15:03 +00:00
Julian Pawlowski
1f5c8fead8 fix 2025-11-03 00:07:46 +00:00
Julian Pawlowski
65e8bdbd15 fix 2025-11-03 00:03:58 +00:00
Julian Pawlowski
3b87cc67e5 fix reload 2025-11-02 23:53:16 +00:00
Julian Pawlowski
54d0359be8 fix 2025-11-02 23:45:05 +00:00
Julian Pawlowski
097c3c63c0 fix 2025-11-02 23:37:19 +00:00
Julian Pawlowski
1b452b72fb fix midnight turnover 2025-11-02 23:27:44 +00:00
Julian Pawlowski
ef05929247 fix entity update 2025-11-02 23:14:26 +00:00
Julian Pawlowski
9fd196948c remove priceRating API relations 2025-11-02 22:30:01 +00:00
Julian Pawlowski
4f6d429132 refactoring for QUARTER_HOURLY prices 2025-11-02 20:22:29 +00:00
Julian Pawlowski
8c61292acf refactoring for QUARTER_HOURLY prices 2025-11-02 19:33:19 +00:00
Julian Pawlowski
70b5a0acd1 fix services 2025-11-02 17:50:50 +00:00
Julian Pawlowski
0eaeaaf708 fix rating data 2025-11-02 17:38:06 +00:00
Julian Pawlowski
6b3d299d3d fix options flow 2025-11-02 17:27:37 +00:00
Julian Pawlowski
e02630440a fix options flow 2025-11-02 16:58:47 +00:00
Julian Pawlowski
0ffa17679b fix config flow 2025-11-02 15:46:13 +00:00
Julian Pawlowski
88ed07c4c0 fix 2025-11-02 12:13:20 +00:00
Julian Pawlowski
f57fdfde6b update 2025-05-25 22:15:25 +00:00
Julian Pawlowski
bd33fc7367 config 2025-05-24 20:50:17 +00:00
Julian Pawlowski
b5c278920c refactoring config flow 2025-05-24 20:50:07 +00:00
Julian Pawlowski
5bb8af942e fix 2025-05-24 17:35:55 +00:00
Julian Pawlowski
86c8073a51 fix 2025-05-24 13:59:46 +00:00
Julian Pawlowski
130b51f5b6 fix 2025-05-24 12:07:54 +00:00
Julian Pawlowski
862dfcb158 fix 2025-05-21 15:14:55 +00:00
Julian Pawlowski
defd6ad92c fix 2025-05-21 11:54:49 +00:00
Julian Pawlowski
8c43f2750f fix 2025-05-21 11:29:50 +00:00
Julian Pawlowski
b23697036a fix 2025-05-21 02:37:41 +00:00
Julian Pawlowski
2ef3217518 fix 2025-05-20 23:35:56 +00:00
Julian Pawlowski
dd65f0efad fix 2025-05-20 23:19:45 +00:00
Julian Pawlowski
0a11f38a1b fix 2025-05-20 20:44:35 +00:00
Julian Pawlowski
a375026e07 refactoring 2025-05-20 20:28:35 +00:00
Julian Pawlowski
1d1f6ec3ca fix 2025-05-20 19:25:10 +00:00
Julian Pawlowski
069490d8cd fix 2025-05-20 18:55:10 +00:00
Julian Pawlowski
76d2e2bb2b fix 2025-05-20 17:57:49 +00:00
Julian Pawlowski
3d37ace85e refactoring 2025-05-20 12:43:12 +00:00
Julian Pawlowski
adc11b0e4d refactoring 2025-05-20 10:41:01 +00:00
Julian Pawlowski
da4ef5675a fix 2025-05-19 10:05:17 +00:00
Julian Pawlowski
1f8158ecea fix 2025-05-19 09:51:52 +00:00
Julian Pawlowski
71b81a9812 refactoring 2025-05-18 14:11:27 +00:00
Julian Pawlowski
1dc2457564 fix rotation 2025-05-17 22:30:49 +00:00
Julian Pawlowski
0116d5ad62 refactoring 2025-05-17 21:59:04 +00:00
Julian Pawlowski
7c4ae98417 refactoring 2025-05-17 20:01:39 +00:00
Julian Pawlowski
52cfc4a87f refactoring 2025-05-17 17:39:06 +00:00
Julian Pawlowski
a4859a9d2e
refactoring 2025-05-11 13:21:22 +02:00
Julian Pawlowski
94ef6ed4a6 add friendly name 2025-04-23 23:53:11 +00:00
Julian Pawlowski
02a226819a refactoring 2025-04-23 23:07:30 +00:00
Julian Pawlowski
3d33d8d6bc add descriptions 2025-04-23 21:13:57 +00:00
Julian Pawlowski
51b028e9b7 add descriptions 2025-04-23 20:18:35 +00:00
Julian Pawlowski
ed779f03f0 refactoring 2025-04-23 20:00:17 +00:00
Julian Pawlowski
c67ec09c9a refactoring 2025-04-23 18:51:40 +00:00
Julian Pawlowski
59cd48977b add copilot instructions 2025-04-23 17:46:12 +00:00
Julian Pawlowski
dd94351278 refactoring 2025-04-23 16:42:31 +00:00
Julian Pawlowski
eeff264ae7 commit changes 2025-04-21 19:59:03 +00:00
Julian Pawlowski
23a46faecc add some entities 2025-04-21 19:36:32 +00:00
Julian Pawlowski
5150ae3f48 refactoring 2025-04-21 18:07:50 +00:00
Julian Pawlowski
385ea6c1de expose config_entry 2025-04-18 22:30:39 +00:00
Julian Pawlowski
aa92de42da add update schedule 2025-04-18 22:10:52 +00:00
Julian Pawlowski
f06b9ff0cf add cleanup 2025-04-18 21:37:48 +00:00
Julian Pawlowski
f092ad2839 add data retrieving 2025-04-18 21:14:36 +00:00
Julian Pawlowski
5f8abf3a63 refactoring 2025-04-18 17:08:08 +00:00
Julian Pawlowski
73fa6c18a7 add authentication 2025-04-18 16:10:14 +00:00
Julian Pawlowski
ef38bf75b5 rename functions 2025-04-18 14:12:10 +00:00
Julian Pawlowski
8123285489 rename directory 2025-04-18 13:16:59 +00:00
Julian Pawlowski
dea7cfee43 Rename component 2025-04-18 12:51:32 +00:00
Julian Pawlowski
131a4eb148
Initial commit 2025-04-18 14:32:54 +02:00