Skip to content

Commit 1d1617d

Browse files
Development (#292)
* Update camera logic for hass 2025.6 (#273) * Development (#267) * Feature/throttle updates and responsive bug (#241) * Fixing throttle updates and resposnive issue * Updating package and changelog with locales * Small refactor * Updating changelog * 248 reported delays with card updates (#249) * Updates with timecard issues * Fixed bug where ticking function wouldn't update the clock if no entity or other props are provided * Optimsations with tooltip * updating log * Updating changelog * Reverting time card story changes * Typo * Locales, prettier & bumping version * Optional breakpoints (#263) * WIP on 253-add-useruser-hook * Cleanup * Adding case where the window context from match media is null * Add useUser hook (#260) * Adding useUser hook and documentation * adding temp alias * Upgrading storybook * Removing framer motion (#265) * Removing framer motion * Moving AutoHeight to shared directory * Removing redundant state variable * Small performance optimisation * Updating locales * Ready for release * bumping versions * Doc updates * Update camera logic for hass 2025.6 * Camera linting --------- Co-authored-by: Shannon Hochkins <mail@shannonhochkins.com> * 269 useusers a new hook to retrieve a list of users (#270) * Development (#267) * Feature/throttle updates and responsive bug (#241) * Fixing throttle updates and resposnive issue * Updating package and changelog with locales * Small refactor * Updating changelog * 248 reported delays with card updates (#249) * Updates with timecard issues * Fixed bug where ticking function wouldn't update the clock if no entity or other props are provided * Optimsations with tooltip * updating log * Updating changelog * Reverting time card story changes * Typo * Locales, prettier & bumping version * Optional breakpoints (#263) * WIP on 253-add-useruser-hook * Cleanup * Adding case where the window context from match media is null * Add useUser hook (#260) * Adding useUser hook and documentation * adding temp alias * Upgrading storybook * Removing framer motion (#265) * Removing framer motion * Moving AutoHeight to shared directory * Removing redundant state variable * Small performance optimisation * Updating locales * Ready for release * bumping versions * Doc updates * New hook, zustand upgrade * Pushing up, check master props * Merging master * Fixed typescript and storyboook * Adding docs * Lots of changes mainly related to useStore * Lots more updates! * Prep for release * Re-running build * bumping package versions * 282 npm install issue (#283) * Fixed create package, re-ran build on packages, fixed react-strict mode for auth * Pushing latest changes * Updating localization - making it smarter, and fixing a few bugs (#288) * Multiple fixes added around locales, needs another round (#289) * Multiple fixes added around locales, needs another round * Updating documentation * Updated useHistory hook, locales (#290) * Updated useHistory hook, locales * Few more tests to go * Refactoring and removing useHass, renaming useStore to useHass * Updating changelog * Prep for release --------- Co-authored-by: kdkavanagh <kdkavanagh@gmail.com>
1 parent c13f58f commit 1d1617d

File tree

256 files changed

+348030
-307251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+348030
-307251
lines changed

CHANGELOG.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,87 @@
1+
# 6.0.0
2+
3+
## Migration Checklist
4+
Perform these steps in order - Full details below under the BREAKING CHANGES section.
5+
1. Replace `useStore` usage where accessing helpers/state directly with `useHass` (BREAKING rename). Update any imports & snapshots accordingly.
6+
2. Remove deprecated `getConfig`, `getServices`, `getUser`, `getStates` calls. Replace with store subscriptions: `useHass(state => state.config)` etc, or snapshots `useHass.getState().config`.
7+
3. Update `useUsers` hook calls: remove `refetch` usage; pass filtering options directly.
8+
4. ButtonCard: remove `unitOfMeasurement` prop. Use automatic locale formatting or `customRenderState` for overrides.
9+
5. ButtonCard/SensorCard: if you relied on automatic domain prefix (e.g. `Light: 50%`), manually add via `description` or `customRenderState`, or use `computeDomainTitle`.
10+
6. TimeCard: if you depended on implicit entity assignment, explicitly pass entity props OR rely on new browser-time behavior.
11+
7. Locale keys changed - You may have typescript errors if referencing locale keys that no longer exist.
12+
8. Migrate any usage of removed `HassContext` / `HassContextProps` (now merged into store). Remove direct context imports.
13+
9. Adjust any code using previous area structure (`services` removed) as it's information that's not in use (please raise an issue if you need this data for a specific use case).
14+
15+
## BREAKING CHANGES
16+
17+
### @hakit/components
18+
- BREAKING / BUGFIX - TimeCard - Fixing unexpected lag when no entity option is used, falls behind by up to 30seconds in some cases, now uses browser time directly when no entity is provided. Removed default "entity" assignment if it's available, now users will have to opt into using an entity if they want to use one (breaking change), all dates when using non entity flow are now timezone/language/locale aware using the new locale services.
19+
- BREAKING - ButtonCard - unitOfMeasurement prop removed, now that we're formatting the same as home assistant, it will respect the users settings for units automatically, if you were using this prop, you will have to remove it and let the component handle the formatting automatically, if you still need to have a custom render state, you can use the `customRenderState` prop to provide your own custom rendering logic.
20+
- BREAKING - ButtonCard - A subtle breaking change, the automatic "domain" prefix before the state value on ButtonCards/SensorCards has been removed, this means for a light card you'll no longer see "Light: 50%", where 50% is the brightness value, this was redundant information as the Name of the entity is clearly displayed, if you still want to add this prefix back, you can either use `customRenderState` prop to provide your own logic, or you can set the `description` prop to include the domain name if you wish, you can import the `computeDomainTitle` helper from `@hakit/core` to help with this.
21+
22+
### @hakit/core
23+
- BREAKING -Refactoring all logic around locale generation, locale keys have changed, values will change as users reported a few inconsistencies with home assistant locale values, if you're using the locale services directly you may have to update some keys, all types have been updated accordingly so you should get type errors once upgrading.
24+
- BREAKING - useHass - The methods - `getConfig`, `getServices`, `getUser`, `getStates` have been removed, this information is now pre-fetched, and will automatically update whenever any of the information changes, you can access this information via the `useStore` hook to subscribe, and retrieve programmatically `const user = useStore(state => state.user);` or to get a snapshot `const user = useStore.getState().user;`
25+
- BREAKING - useUsers - options passed to this hook have changed, `refetch` function has been removed, and you now just pass the filtering options directly.
26+
- BREAKING - useStore -> Deprecated and renamed to useHass, useHass functionality has been merged into useStore with methods accessible via the store directly, for example:
27+
```ts
28+
// OLD
29+
const { callService } = useHass();
30+
// NEW
31+
const { callService } = useStore.getState().helpers;
32+
// OLD
33+
const { windowContext } = useHass();
34+
// NEW
35+
const windowContext = useStore((state) => state.windowContext);
36+
```
37+
- BREAKING - HassContext, HassContextProps - Removed, and merged with UseHassStore (or HassStore if not using the hook)
38+
- NEW/BREAKING - useAreas - now supports floors, a floor_id and a FloorRegistryEntry will be associated with an area, the breaking change is that "services" were removed from the area structure.
39+
40+
## NEW FEATURES
41+
42+
### @hakit/components
43+
- NEW - LightControls - Added support for "favorites" similar to how home assistant displays, we do not have the management of favorite colors via the UI here as home assistant does.
44+
45+
### @hakit/core
46+
- NEW - useHistory - Updated useHistory subscriptions to match latest logic with home assistant, added new options to support numeric histories and splitting by device class.
47+
- NEW - useLocalData - A new hook to subscribe to locale data updates from home assistant, this includes information related to formatting language, number and date formatting, the formatter api functions rely on this data to format values correctly and a wide range of helper methods are now available.
48+
- NEW - useRegistryData - A new hook to subscribe to registry data updates from home assistant for entities, devices, areas, floors and more
49+
- NEW - useFloors - A new hook to subscribe to floor registry data from home assistant, this will return a hierarchical list of floors and their associated areas, and the devices/entities within the areas, any areas not assigned to a floor will be part of the "Unassigned" floor.
50+
- NEW - formatter - Convenience formatter methods to format entity states, attributes and date/time values according to the current locale and configuration, this is now accessible via the store `useStore(state => state.formatter)` or programmatically `useStore.getState().formatter`, examples added to the `useStore` docs.
51+
- NEW - computeDefaultFavoriteColors - A new function to get the default fav colors for a light if supported, as well as lightSupportsFavoriteColors function
52+
- NEW - entityRegistryEntries now available on the store via useStore(state => state.entityRegistryEntries) or useStore().getState().entityRegistryEntries
53+
- NEW - getExtendedEntityRegistryEntry - a new method to retrieve a single entity registry entry
54+
- NEW - getExtendedEntityRegistryEntries - a new method to retrieve multiple entity registry entries at once
55+
- NEW - updateEntityRegistryEntry - a new method to update an entity registry entry
56+
- NEW - removeEntityRegistryEntry - a new method to remove an entity registry entry
57+
- NEW - fetchEntityRegistryDisplayEntry - a new method to fetch the display entry for a single entity
58+
- NEW - getAutomaticEntityIds - Ask Home Assistant for automatically suggested entity_ids for given IDs.
59+
- NEW - findBatteryEntity - Find the most relevant battery entity from a list of registry display entries.
60+
- NEW - findBatteryChargingEntity - Locate a battery charging entity (device_class === "battery_charging") in the provided list.
61+
- NEW - createAreaRegistryEntry - A new method to create an area registry entry.
62+
- NEW - updateAreaRegistryEntry - A new method to update an area registry entry.
63+
- NEW - deleteAreaRegistryEntry - A new method to delete an area registry entry.
64+
- NEW - subscribeFloorRegistry - A new method to subscribe to floor registry updates.
65+
- NEW - updateDeviceRegistryEntry - A new method to update a device registry entry.
66+
- NEW - removeConfigEntryFromDevice- A new method to remove a config entry from a device.
67+
68+
## IMPROVEMENTS
69+
70+
### @hakit/components
71+
- IMPROVEMENT - Weather Card - Updated some styling issues and layout issues for smaller devices, moved apparent temperature to be in the weather details section automatically when available, locale updates for state values and attributes
72+
- IMPROVEMENT - Updated multiple components to use the new locale keys
73+
- IMPROVEMENT - ButtonCard - Updated to use new formatters to format attribute/state values correctly
74+
75+
### @hakit/core
76+
- updating computeStateDisplay to match home assistant logic
77+
78+
## BUGFIXES
79+
80+
### @hakit/components
81+
- BUGFIX - LightControls - Fixed bugs relating to the control slider, fixed issue where brightness value wasn't aligning with the slider position and value of the entity, fixed issue where lights that don't support color, temp, brightness would not render a "switch" to control the light on/off state.
82+
- BUGFIX - Weather Card - updated hard coded "feels like" to use "apparent temperature" locale, localizing state value
83+
84+
185
# 5.1.6
286

387
### General

0 commit comments

Comments
 (0)