dan-r / HomeAssistant-NissanConnect

Unofficial Home Assistant integration for interacting with Nissan Connect vehicles 🚗
MIT License
45 stars 12 forks source link

Companion App Watch Template #80

Open dunxd opened 1 day ago

dunxd commented 1 day ago

I made a template that shows the status of my Nissan Leaf on my Google Pixel watch through Home Assistant Template Tiles.

<h3>Leaf<br> ⚡{{states("sensor.leaf_battery_level")}}%  🛣 {{states("sensor.leaf_range_ac_off")}}mi<br>🔌{{states("binary_sensor.leaf_plugged_in")}}<br>⋙ {{"{:,}".format(states("sensor.leaf_monthly_distance")|round)}}mi this month</h3>

screenshot-2024-11-25-22-21-42

At glance this shows me current charge, range (AC off), if it is currently plugged in or not, and how many miles I've driven so far this month.

Sensor names may be slightly different based on model of the car. Your charger may provide a better measure of the status than binary_sensor.leaf_plugged_in - I use MyEnergi Zappi which shows plugged in, charging etc with a single sensor.

Unfortunately the Template tile only supports emoji for symbols rather than Material Design Icons, so a bit ugly but it does the trick.

You can preview this most easily in Home Assistant using the Developer Tools > Template screen in Home Assistant.

Using <h3> tags the above template more or less fills the available space. Adjust h tags or remove them if you want to add more.

dan-r commented 8 hours ago

Looks good - thank you for sharing!

I've got a similar iPhone widget I've been meaning to share.

I set up a wiki section called Dashboard Designs. Could you please see if you're able to add to this, as it'd be a good place to record this.

Dan

dunxd commented 3 hours ago

I saw that, and was intending to post there but it looks like I have to clone it, edit, then submit as a PR. Is that how to do it?

Is your wiki set to only allow repo collaborators to edit? I don't see an edit button, which is most likely why. See https://docs.github.com/en/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis for how to make it writable by anyone.