Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Venetian Blind support #205

Open
wants to merge 85 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
4ad6183
Switch to using `percentage` instead of `speed`
rohankapoorcom Apr 22, 2022
2dbf190
Set the iconRotateSpeed for fans that have no speed controls
rohankapoorcom Apr 23, 2022
8214cfe
Hardcode step to 1 if not a multispeed fan
rohankapoorcom Apr 24, 2022
1ebbd75
chore(deps): bump minimist from 1.2.5 to 1.2.6
dependabot[bot] Jun 1, 2022
181743f
chore(deps): bump ansi-regex from 4.1.0 to 4.1.1
dependabot[bot] Jun 1, 2022
818c6ad
Merge pull request #3 from rohankapoorcom/rohankapoorcom-fix-fans
rohankapoorcom Jun 2, 2022
bcd48cf
Merge pull request #2 from custom-cards/dependabot/npm_and_yarn/ansi-…
rohankapoorcom Jun 2, 2022
b81a220
Merge pull request #1 from custom-cards/dependabot/npm_and_yarn/minim…
rohankapoorcom Jun 2, 2022
58a5fdb
Merge pull request #6 from rohankapoorcom/animate-speedless-fans-upst…
rohankapoorcom Jun 2, 2022
dfc8bf9
1.10.8
rohankapoorcom Jun 2, 2022
6a8d7da
Remove `domains` from hacs.json for HACS validation
rohankapoorcom Jun 2, 2022
67ab98a
1.10.9
rohankapoorcom Jun 2, 2022
0b0fd4c
Remove /dist/ directory and add to .gitignore
rohankapoorcom Jun 4, 2022
ec6747f
Remove rollup-plugin-uglify
rohankapoorcom Jun 5, 2022
2b19cae
Merge pull request #16 from rohankapoorcom/remove-rollup-plugin-uglify
rohankapoorcom Jun 5, 2022
0091c5e
Update README.md
Berserkir-Wolf Jul 12, 2022
1b7660b
Merge pull request #21 from Berserkir-Wolf/patch-1
rohankapoorcom Jul 13, 2022
9c61f2e
Merge pull request #15 from rohankapoorcom/gitignore-dist
rohankapoorcom Jul 13, 2022
d948653
chore(deps): bump terser from 4.8.0 to 4.8.1
dependabot[bot] Jul 22, 2022
fea85de
Merge pull request #25 from custom-cards/dependabot/npm_and_yarn/ters…
rohankapoorcom Jul 24, 2022
96c9787
fix: Scrolling on touch screens
Pajn Aug 13, 2022
ea909a3
fix: Handle pointercancel event
Pajn Aug 13, 2022
e7278e6
Merge remote-tracking branch 'upstream/main'
Pajn Aug 13, 2022
86fadf5
Merge pull request #28 from Pajn/main
rohankapoorcom Nov 17, 2022
d90f28d
1.10.10
rohankapoorcom Nov 18, 2022
97c10d4
chore(deps): bump minimatch from 3.0.4 to 3.1.2
dependabot[bot] Nov 18, 2022
b08f21f
Merge pull request #40 from custom-cards/dependabot/npm_and_yarn/mini…
rohankapoorcom Nov 18, 2022
f3080af
chore(deps): bump json5 and tsconfig-paths
dependabot[bot] Jan 3, 2023
7728e37
chore(deps): bump json5 from 1.0.1 to 1.0.2
dependabot[bot] Jan 8, 2023
50be66b
Create sk.json
misa1515 Jul 4, 2023
48be431
Fix localization of entity states
rohankapoorcom Aug 12, 2023
3ba12e5
Merge pull request #51 from rohankapoorcom/fix-localization-entity-st…
rohankapoorcom Aug 12, 2023
1264730
Merge pull request #41 from custom-cards/dependabot/npm_and_yarn/json…
rohankapoorcom Aug 12, 2023
a62942b
Merge pull request #42 from custom-cards/dependabot/npm_and_yarn/json…
rohankapoorcom Aug 12, 2023
518b537
chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.5
dependabot[bot] Aug 12, 2023
e8df6a8
Merge pull request #52 from custom-cards/dependabot/npm_and_yarn/word…
rohankapoorcom Aug 12, 2023
50fb6a5
Include the Slovak translation
rohankapoorcom Aug 12, 2023
a3bb013
Merge pull request #49 from misa1515/patch-1
rohankapoorcom Aug 12, 2023
cdcfb78
Release 1.10.11
rohankapoorcom Aug 12, 2023
6a3b895
Add support for right-to-left sliders
rohankapoorcom Aug 12, 2023
f85196c
Fix vertical cards on touchscreens
rohankapoorcom Aug 12, 2023
ae16d11
Merge pull request #54 from rohankapoorcom/fix-vertical-cards
rohankapoorcom Aug 13, 2023
cbf55c9
Merge pull request #53 from rohankapoorcom/right-left-support
rohankapoorcom Aug 13, 2023
e1c18df
Release 1.11.0
rohankapoorcom Aug 13, 2023
57685a1
initial attribute yaml config
lizsugar Apr 23, 2022
6a0e15e
Display user-defined attribute
lizsugar Apr 26, 2022
b9e148f
minor visual changes and default attribute options by domain
lizsugar Apr 26, 2022
52c5925
State and attribute are now displyed on a single line
lizsugar Apr 29, 2022
7dc8dab
Update README.md
rohankapoorcom Aug 13, 2023
96a83a2
Merge pull request #55 from rohankapoorcom/lizsugar_display_attribute
rohankapoorcom Aug 13, 2023
b50fdd5
Add support for automation domain
lizsugar Apr 17, 2022
c24094a
create proper automation controller
lizsugar Apr 22, 2022
a410bc6
Update README to include automation domain
rohankapoorcom Aug 14, 2023
6353fb6
Merge pull request #56 from rohankapoorcom/lizsugar_automation_domain…
rohankapoorcom Aug 14, 2023
1391ab8
Introduce MWC form components to use in the editor
rohankapoorcom Aug 14, 2023
cefaa2f
Working general tab and icon tab (except for the tap action control)
rohankapoorcom Aug 14, 2023
28e7790
Use ha-entity-picker for selecting the entitiy
rohankapoorcom Aug 15, 2023
719fa7c
Use HA selectors for icon and attributes
rohankapoorcom Aug 15, 2023
2c8decb
Rebuild the slider direction and background controls
rohankapoorcom Aug 15, 2023
41405a7
Rebuild the Action button controls
rohankapoorcom Aug 15, 2023
e7cbd08
Rebuild the Icon tap action controls
rohankapoorcom Aug 15, 2023
cd881f8
Remove debug statements
rohankapoorcom Aug 15, 2023
83ef84d
Remove unnused material/mwc-select package
rohankapoorcom Aug 15, 2023
cca2d94
Merge pull request #57 from rohankapoorcom/fix-editor-ui
rohankapoorcom Aug 15, 2023
741fe26
Release 1.12.0
rohankapoorcom Aug 15, 2023
963e9f5
Fix vertical alignment of attribute in compact mode (fixes #58)
rohankapoorcom Aug 15, 2023
bf3faef
Merge pull request #59 from rohankapoorcom/attribute-alignment-compac…
rohankapoorcom Aug 15, 2023
b2213a9
Upgrade to Node 18
rohankapoorcom Aug 16, 2023
5310c83
Merge pull request #60 from rohankapoorcom/upgrade-to-node-18
rohankapoorcom Aug 16, 2023
a014c06
initial controller for input-number domain
lizsugar Apr 26, 2022
315295b
Add input_number domain to slider-button-card
lizsugar Apr 27, 2022
8bd2152
cleanup
lizsugar Apr 27, 2022
5104562
Resolve issue in #3 where the functional step count was a result of both
lizsugar May 20, 2022
b94246c
disable debug
lizsugar May 20, 2022
8e92000
Update README for input_number support
rohankapoorcom Aug 16, 2023
c17f74e
Merge pull request #61 from rohankapoorcom/lizsugar_input_number
rohankapoorcom Aug 16, 2023
f789f70
Add docs for input_number
rohankapoorcom Aug 16, 2023
cedf050
Merge pull request #62 from rohankapoorcom/input_number_docs
rohankapoorcom Aug 16, 2023
b334eb9
Add support for number entities
rohankapoorcom Aug 16, 2023
a391816
Update documentation for Number entities
rohankapoorcom Aug 16, 2023
03d20cf
Merge pull request #64 from rohankapoorcom/number-support
rohankapoorcom Aug 16, 2023
5478827
Release 1.13.0
rohankapoorcom Aug 16, 2023
bfa9081
Update release.yml workflow to use newer actions
rohankapoorcom Aug 16, 2023
aa5d9b3
Update sk.json
misa1515 Apr 27, 2024
f636283
Merge pull request #74 from misa1515/patch-6
rohankapoorcom Apr 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

# Upload build file to the releas as an asset.
- name: Upload zip to release
uses: svenstaro/upload-release-action@v1-release
uses: svenstaro/upload-release-action@v2-release

with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/dist/
/node_modules/
/.rpt2_cache/
/.idea/
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.17.1
76 changes: 42 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![GitHub Release][releases-shield]][releases]
[![hacs_badge](https://img.shields.io/badge/HACS-default-orange.svg?style=for-the-badge)](https://github.com/custom-components/hacs)

A button card with integrated slider for `light, switch, fan, cover, input_boolean, media_player, climate, lock` entities.
A button card with integrated slider for `automation, light, switch, fan, cover, input_boolean, input_number, media_player, number, climate, lock` entities.

![Preview][preview]
![Preview 2][preview-2]
Expand Down Expand Up @@ -71,11 +71,13 @@ Slider Button Card supports Lovelace's Visual Editor.
| Name | Type | Requirement | Description | Default |
| ----------------- | ------- | ------------ | ------------------------------------------- | ------------------- |
| type | string | **Required** | `custom:slider-button-card` |
| entity | string | **Required** | HA entity ID from domain `light, switch, fan, cover, input_boolean, media_player, climate, lock` | |
| entity | string | **Required** | HA entity ID from domain `automation, light, switch, fan, cover, input_boolean, input_number, media_player, number climate, lock` | |
| name | string | **Optional** | Name | `entity.friendly_name` |
| show_attribute | boolean | **Optional** | Show attribute | `false` (except for `media_player` entities) |
| show_name | boolean | **Optional** | Show name | `true` |
| show_state | boolean | **Optional** | Show state | `true` |
| compact | boolean | **Optional** | Compact mode, display name and state inline with icon. Useful for full width cards. | `false` |
| attribute | string | **Optional** | Name of the attribute to display if `show_attribute` is `true`.
| icon | object | **Optional** | [Icon options](#icon-options) | |
| slider | object | **Optional** | [Slider options](#slider-options) | |
| action_button | object | **Optional** | [Action button options](#action-button-options) | |
Expand All @@ -93,7 +95,7 @@ Slider Button Card supports Lovelace's Visual Editor.

| Name | Type | Requirement | Description | Default |
| ----------------- | ------- | ------------ | ------------------------------------------- | ------------------- |
| direction | string | **Optional** | Direction `left-right, top-bottom, bottom-top` | `left-right` |
| direction | string | **Optional** | Direction `left-right, right-left, top-bottom, bottom-top` | `left-right` |
| background | string | **Optional** | Background `solid, gradient, triangle, striped, custom` | `gradient` |
| use_state_color | boolean | **Optional** | Use state color | `true` |
| use_percentage_bg_opacity | boolean | **Optional** | Apply opacity to background based on percentage | `true` |
Expand Down Expand Up @@ -169,7 +171,7 @@ Custom styles can be set by using [Card mod](https://github.com/thomasloven/love
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/general-minimal.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/general-minimal.png">
</td>
<td valign="top">

Expand Down Expand Up @@ -200,7 +202,7 @@ action_button:
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/general-compact.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/general-compact.png">
</td>
<td valign="top">

Expand All @@ -220,7 +222,7 @@ compact: true
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/icon-minimal.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/icon-minimal.png">
</td>
<td valign="top">

Expand All @@ -240,7 +242,7 @@ icon:
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/icon-icon-override.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/icon-icon-override.png">
</td>
<td valign="top">

Expand All @@ -264,7 +266,7 @@ icon:
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/action-minimal.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/action-minimal.png">
</td>
<td valign="top">

Expand All @@ -284,7 +286,7 @@ action_button:
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/action-custom.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/action-custom.png">
</td>
<td valign="top">

Expand All @@ -306,7 +308,7 @@ action_button:
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/action-custom-icon.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/action-custom-icon.png">
</td>
<td valign="top">

Expand Down Expand Up @@ -334,7 +336,7 @@ action_button:
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/slider-minimal.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/slider-minimal.png">
</td>
<td valign="top">

Expand All @@ -354,7 +356,7 @@ slider:
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/slider-state-color.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/slider-state-color.png">
</td>
<td valign="top">

Expand All @@ -375,7 +377,7 @@ slider:
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/slider-show-track.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/slider-show-track.png">
</td>
<td valign="top">

Expand All @@ -397,7 +399,7 @@ slider:
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/slider-force-square.png">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/slider-force-square.png">
</td>
<td valign="top">

Expand Down Expand Up @@ -425,7 +427,7 @@ For fan entities the icon auto rotates based on the speed of the fan.
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/fan.gif">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/fan.gif">
</td>
<td valign="top">

Expand Down Expand Up @@ -458,7 +460,7 @@ name: Fan
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/switch.gif">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/switch.gif">
</td>
<td valign="top">

Expand Down Expand Up @@ -492,7 +494,7 @@ For most use cases: set `slider.direction: top-bottom` and `slider.background: s
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/cover.gif">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/cover.gif">
</td>
<td valign="top">

Expand Down Expand Up @@ -527,7 +529,7 @@ In this example the action button is used to toggle play/pause.
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/media.gif">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/media.gif">
</td>
<td valign="top">

Expand Down Expand Up @@ -565,7 +567,7 @@ Default behavior: slider is used to set target temperature, it doesn't alter sta
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/climate.gif">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/climate.gif">
</td>
<td valign="top">

Expand Down Expand Up @@ -599,7 +601,7 @@ Default behavior: `slider.toggle_on_click: true`
</td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/examples/lock.gif">
<td><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/examples/lock.gif">
</td>
<td valign="top">

Expand Down Expand Up @@ -631,7 +633,7 @@ name: Lock
</td>
</tr>
<tr>
<td valign="top"><img src="https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/preview.gif">
<td valign="top"><img src="https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/preview.gif">
</td>
<td valign="top">

Expand Down Expand Up @@ -709,7 +711,11 @@ Mixed `group` entities are not supported, if you want to control multiple
- media players use [Media player group](https://www.home-assistant.io/integrations/media_player.group/)

## Known issues
When you discover any bugs please open an [issue](https://github.com/mattieha/slider-button-card/issues).
When you discover any bugs please open an [issue](https://github.com/custom-cards/slider-button-card/issues).

### Input Number & Number entities
- If the `input_number.entity.min value` is not cleanly divisible by the `input_number.entity.step value`, then the slider card is off by an amount. If your `input_number` has `min = 5`, `max = 25`, `step = 5` then it will work just fine. But if the `step` is 2, then it will be off. This also has the side effect of changing the `input_number` to an "out of bounds" value when modified via this card. Using `step = 1` avoids this problem.
- The same limitation applies to `number` entities.

## Languages

Expand All @@ -719,28 +725,30 @@ This card supports translations. Please, help to add more translations and impro
- French
- German
- Hebrew
- Korean
- Nederlands (Dutch)
- Polish (polski)
- Portuguese
- Russian
- Korean
- Slovak
- [_Your language?_][add-translation]

## Credits
- Inspired by [Slider entity row](https://github.com/thomasloven/lovelace-slider-entity-row)
- Originally inspired by [Slider entity row](https://github.com/thomasloven/lovelace-slider-entity-row)
- Forked from [Slider button card](https://github.com/mattieha/slider-button-card/) by [@mattieha](https://www.github.com/mattieha)

---
[![beer](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/mattijsha)

<!-- References -->
[hacs]: https://hacs.xyz
[add-translation]: https://github.com/mattieha/slider-button-card/blob/main/CONTRIBUTE.md#adding-a-new-translation
[visual-editor]: https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/card-editor.png
[preview]: https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/preview.gif
[preview-2]: https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/preview-2.gif
[grid]: https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/grid-not-square.png
[full-width]: https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/grid-full-width.png
[latest-release]: https://github.com/mattieha/slider-button-card/releases/latest
[releases-shield]: https://img.shields.io/github/release/mattieha/slider-button-card.svg?style=for-the-badge
[releases]: https://github.com/mattieha/slider-button-card/releases
[icon-minimal]: https://raw.githubusercontent.com/mattieha/slider-button-card/main/assets/grid-full-width.png
[add-translation]: https://github.com/custom-cards/slider-button-card/blob/main/CONTRIBUTE.md#adding-a-new-translation
[visual-editor]: https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/card-editor.png
[preview]: https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/preview.gif
[preview-2]: https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/preview-2.gif
[grid]: https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/grid-not-square.png
[full-width]: https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/grid-full-width.png
[latest-release]: https://github.com/custom-cards/slider-button-card/releases/latest
[releases-shield]: https://img.shields.io/github/release/custom-cards/slider-button-card.svg?style=for-the-badge
[releases]: https://github.com/custom-cards/slider-button-card/releases
[icon-minimal]: https://raw.githubusercontent.com/custom-cards/slider-button-card/main/assets/grid-full-width.png
Loading