Skip to content

Commit 6ac002a

Browse files
committed
Use todo entity for todo-list-card
1 parent 6c2cc47 commit 6ac002a

23 files changed

+544
-414
lines changed

.hass_dev/lovelace-mushroom-showcase.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ views:
1616
- !include views/humidifier-view.yaml
1717
- !include views/select-view.yaml
1818
- !include views/number-view.yaml
19-
- !include views/shopping-list-view.yaml
19+
- !include views/todo-list-view.yaml

.hass_dev/views/shopping-list-view.yaml renamed to .hass_dev/views/todo-list-view.yaml

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
1-
title: Shopping Lists
2-
icon: mdi:cart
1+
title: Todo Lists
2+
icon: mdi:clipboard-list
33
cards:
44
- type: grid
5-
title: Shopping List
5+
title: Todo List
66
cards:
7-
- type: custom:mushroom-shopping-list
7+
- type: custom:mushroom-todo-list
8+
entity: todo.shopping_list
89
name: My Shopping List
9-
icon: mdi:cart
10+
icon: mdi:format-list-checks
1011
primary_info: name
1112
secondary_info: state
1213
columns: 1
1314
square: false
1415
- type: vertical-stack
1516
title: Layout
1617
cards:
17-
- type: custom:mushroom-shopping-list
18-
name: Horizontal Shopping List
18+
- type: custom:mushroom-todo-list
19+
entity: todo.shopping_list
20+
name: Horizontal Todo List
1921
layout: horizontal
2022
primary_info: name
2123
secondary_info: state
2224
- type: grid
2325
columns: 2
2426
square: false
2527
cards:
26-
- type: custom:mushroom-shopping-list
28+
- type: custom:mushroom-todo-list
29+
entity: todo.shopping_list
2730
checked_icon: mdi:checkbox-blank-circle
2831
unchecked_icon: mdi:checkbox-blank-circle-outline
29-
- type: custom:mushroom-shopping-list
30-
name: Vertical Shopping List
32+
- type: custom:mushroom-todo-list
33+
entity: todo.shopping_list
34+
name: Vertical Todo List
3135
icon: mdi:arrow-down
3236
layout: vertical
3337
primary_info: name

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Different cards are available for differents entities :
8484
- 🌡 [Climate card](docs/cards/climate.md)
8585
- 📑 [Select card](docs/cards/select.md)
8686
- 🔢 [Number card](docs/cards/number.md)
87-
- 🛒 [Shopping list card](docs/cards/shopping-list.md)
87+
- 📃 [Todo list card](docs/cards/todo-list.md)
8888
8989
### Theme customization
9090

docs/cards/shopping-list.md

-22
This file was deleted.

docs/cards/todo-list.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Todo list card
2+
3+
![Todo list light](../images/todo-list-light.png)
4+
![Todo list dark](../images/todo-list-dark.png)
5+
6+
## Description
7+
8+
A mushroom card for the todo list entity.
9+
10+
## Configuration variables
11+
12+
All options are available in the lovelace editor but you can use `yaml` if you want.
13+
14+
| Name | Type | Default | Description |
15+
|:--------------------|:----------------------------------|:-----------------------------|:-------------------------------------------------|
16+
| `name` | string | Shopping List | Name of the card. May be displayed as its title. |
17+
| `icon` | string | `mdi:cart` | Icon displayed next to the title. |
18+
| `layout` | `default` `horizontal` `vertical` | `default` | Affects the internal layout of the card. |
19+
| `primary_info` | `name` `state` `none` | `name` | Info to show as title. |
20+
| `secondary_info` | `name` `state` `none` | `state` | Info to show as subtitle. |
21+
| `checked_icon` | string | `mdi:checkbox-marked` | Icon used for completed items. |
22+
| `unchecked_icon` | string | `mdi:checkbox-blank-outline` | Icon used for open items. |
23+
| `tap_action` | action | `none` | Home assistant action to perform on tap. |
24+
| `hold_action` | action | `more-info` | Home assistant action to perform on hold. |
25+
| `double_tap_action` | action | `none` | Home assistant action to perform on double_tap. |
File renamed without changes.
File renamed without changes.

src/cards/shopping-list-card/const.ts

-9
This file was deleted.

src/cards/shopping-list-card/shopping-list-card.ts

-275
This file was deleted.

0 commit comments

Comments
 (0)