Skip to content

Commit e850294

Browse files
Development (#236)
* 229 documentation generation has hiccups with events (#235) * Cleanup of sidebar, updating storybook & fixing a few other issues * Moving theme out of state, and adding to new exported store * Adding missing dependancy (#234) * Only forcing view when not specified (#233) * Adding colour fallback when light entity only supports brightness and no color (#232) * Removing redundant code * Prep for release
1 parent 5c969ce commit e850294

File tree

148 files changed

+102347
-95905
lines changed

Some content is hidden

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

148 files changed

+102347
-95905
lines changed

.storybook/main.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ export default ({
2525
options: {
2626
}
2727
},
28-
docs: {
29-
autodocs: 'tag'
30-
},
3128
typescript: {
3229
check: true,
3330
reactDocgen: 'react-docgen-typescript',

.storybook/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const theme = {
1919

2020

2121
export default {
22+
tags: ['autodocs'],
2223
decorators: [
2324
withThemeFromJSXProvider({
2425
themes: {
@@ -60,7 +61,6 @@ export default {
6061
</div>
6162
},
6263
],
63-
6464
parameters: {
6565
layout: 'centered',
6666
controls: {

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# 5.0.6
2+
3+
### @hakit/components
4+
- NEW - ThemeProvider - Overhaul on state management, now uses a store to manage the theme, this will reduce re-renders and allow you to programmatically change the theme from anywhere in your application, this is also exposed as a hook `useThemeStore` to allow you to change the theme from anywhere in your application if need be.
5+
- BREAKING - ThemeProvider.includeThemeControls - This prop is most likely never used for production dashboards, it's been removed as part of this release, if you still want to use the ThemeControls you can import the ThemeControlsModal component directly from the components package and include adjacent to the ThemeProvider.
6+
- BUGFIX - SidebarCard - The TimeCard included in the header of the timecard had a hover effect that was introduced in a previous release, this has been removed.
7+
- NEW - TimeCard - `timeEntity` and `dateEntity` now available as new props to specify custom date/time entities if need be.
8+
- BUGFIX - LightControls - When a light entity didn't support color, the slider would appear in a grey scale colour, it will now naturally appear rendering an average kelvin value. fixes [issue](https://github.com/shannonhochkins/ha-component-kit/issues/226)
9+
- BUGFIX - CalendarCard - When specifying a default view via the `view` prop, the internal logic (when the component was < 400px wide) would reset the view to week view, it will only do this logic now if a view prop was not specified, fixes [issue](https://github.com/shannonhochkins/ha-component-kit/issues/231)
10+
11+
12+
### @hakit/core
13+
- BUGFIX - useEntity will now return a kelvin value for a light that doesn't support color, previously it would return the default colour for the "off" state.
14+
- Locales & types updated to align with latest home assistant version
15+
16+
### NPM CREATE v1.1.12
17+
- Deploy script was missing `prompts` package when creating the template, thanks for reporting @maumi, fixes [issue](https://github.com/shannonhochkins/ha-component-kit/issues/229)
18+
19+
### Maintenance
20+
21+
- Upgraded storybook and cleaned up sidebar to reduce redundant secondary pages with a demo
22+
123

224
# 5.0.5
325

hass-connect-fake/mocks/mockEntities.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const entities: HassEntities = {
5252
friendly_name: "Dining room light",
5353
},
5454
}),
55+
5556
...createLight("light.fake_light_2", {
5657
attributes: {
5758
friendly_name: "Office Down light",
@@ -69,6 +70,29 @@ export const entities: HassEntities = {
6970
rgb_color: [64, 255, 112],
7071
},
7172
}),
73+
...createLight("light.no_color", {
74+
attributes: {
75+
supported_color_modes: [
76+
"brightness"
77+
],
78+
color_mode: "brightness",
79+
brightness: 250,
80+
off_with_transition: false,
81+
off_brightness: null,
82+
supported_features: 40,
83+
icon: "mdi:lightbulb",
84+
friendly_name: "Light No Color",
85+
min_color_temp_kelvin: undefined,
86+
max_color_temp_kelvin: undefined,
87+
min_mireds: undefined,
88+
max_mireds: undefined,
89+
effect_list: undefined,
90+
hs_color: undefined,
91+
rgb_color: undefined,
92+
xy_color: undefined,
93+
raw_state: undefined,
94+
},
95+
}),
7296
...createSwitch("switch.fake_switch"),
7397
...createSwitch("switch.unavailable", {
7498
state: "unavailable",

0 commit comments

Comments
 (0)