1.0.0 • Published 4 years ago

restriction-card v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

Restriction Card

A community driven restriction of best practices for Home Assistant Lovelace custom cards

GitHub Release License

Project Maintenance GitHub Activity

Discord Community Forum

Options

NameTypeRequirementDescriptionDefault
typestringRequiredcustom:restriction-card
namestringOptionalCard nameRestriction
show_errorbooleanOptionalShow what an error looks like for the cardfalse
show_warningbooleanOptionalShow what a warning looks like for the cardfalse
entitystringOptionalHome Assistant entity ID.none
tap_actionobjectOptionalAction to take on tapaction: more-info
hold_actionobjectOptionalAction to take on holdnone

Action Options

NameTypeRequirementDescriptionDefault
actionstringRequiredAction to perform (toggle-menu, more-info, toggle, call-service, navigate url, none)toggle-menu for menu and more-info for items
navigation_pathstringOptionalPath to navigate to (e.g. /lovelace/0/) when action defined as navigatenone
urlstringOptionalURL to open on click when action is url. The URL will open in a new tabnone
servicestringOptionalService to call (e.g. media_player.media_play_pause) when action defined as call-servicenone
service_dataobjectOptionalService data to include (e.g. entity_id: media_player.bedroom) when action defined as call-servicenone
hapticstringOptionalHaptic feedback for the Beta IOS App success, warning, failure, light, medium, heavy, selectionnone

Starting a new card from restriction-card

Step 1

Clone this repo

Step 2

Install necessary modules yarn install or npm install

Step 3

Do a test lint & build on the project. You can see available scripts in the package.json npm run build

Step 4

Customize to suit your needs and contribute it back to the custom-cards org

Troubleshooting