moralmunky / Home-Assistant-Mail-And-Packages-Custom-Card

A Custom Lovelace card to pull together the mail and packages sensors.
72 stars 16 forks source link

Home-Assistant-Mail-And-Packages-Custom-Card

A Custom Lovelace card to pull together the mail and packages sensors.

Preview of card

Lovelace GUI Setup

Manual Install

Both JS files need to be stored inside the path/to/config/www/ folder. In the Lovelace reource URL path, local is the same as the www folder. Construct your path to the JS inside the www folder for the resurce URL. For the example below:

path/to/config/www/Home-Assistant-Mail-And-Packages-Custom-Card/Home-Assistant-Mail-And-Packages-Custom-Card.js

path/to/config/www/Home-Assistant-Mail-And-Packages-Custom-Card/Home-Assistant-Mail-And-Packages-Custom-Card-editor.js

Configuration > Lovelace Dashboards > Resources

url: /local/Home-Assistant-Mail-And-Packages-Custom-Card/Home-Assistant-Mail-And-Packages-Custom-Card.js
type: Javascript Module

HACS Install

HACS will install the files and add an entry in the Lovelace resource

HACS install path

/path/to/config/www/community/Home-Assistant-Mail-And-Packages-Custom-Card/

Path HACS adds to Lovelace resources

/hacsfiles/Home-Assistant-Mail-And-Packages-Custom-Card/Home-Assistant-Mail-And-Packages-Custom-Card.js

Card Configuration

Add a manual card then input the yaml below.

type: 'custom:mail-and-packages-card'
name: Mail Summary
updated: sensor.mail_updated
details: true
image: false

Switch to the visual editor and complete the setup by assigning the sensors you have enabled in the Mail and Packages integration.

USPS Mail Image Display

The mail images can be displayed by using the mail_today.gif directly or use a local file camera entity. Use the blue toggle switches to turn either option on or off.

Delivery Message Sensor

The delivery message sensor, sensor.mail_delieveries, is not created by the Mail and Packages Integration. You must create a template sensor. This is left out of the integration on purpose so they can customize as they see fit.

Preview of visual-editor