Home Assistant logo

Home Assistant – Quick and dirty fixes

This post was most recently updated on February 24th, 2022.

3 min read.

This article documents the quick and dirty fixes and patches that I have found for Home Assistant. I’m trying to document all the things that are not complicated enough to warrant an actual blog post themselves somewhere, and this page is as good a place as any.

Hopefully, these tips end up being helpful to someone else as well!

My favorite thoughtful workarounds to fix Home Assistant 🤠

What if my lovelace-weather-card-chart suddenly misses all charts?

First, make sure your weather integration still works by checking on the entity/sensor values that you’re expecting to use.

Second, update your lovelace-weather-card-chart version either using HACS or manually.

If that’s all good but the issue still exists, overwrite the weather-card-chart.js in /www or /www/hacsfiles (or wherever your local version of the file is stored) by using this forked version (for whatever reason, it worked for me):
https://github.com/scstraus/lovelace-weather-card-chart/blob/e25acb9fbcd44f61da3e08d61b2ef7911840e82b/weather-card-chart.js

How to add a second Worx Landroid to my Home Assistant?

If you have installed one of the great (but unofficial) Worx Landroid integrations to your Home Assistant, you might already be aware that getting everything to work with just one robot is pretty easy.

But what happens when you get another one? You might find out, that it’s not quite as easy to add the second one – I sure did.

But here’s the short answer on how to do it:
1) Remove the integration (comment the lines in configuration.yaml & remove the add-on using HACS)
2) Duplicate the entries in the entity registry (you need to make sure you have each entity for each one of your landroids – by name), and then
3) Reinstall the integration.

How to add Sonoff devices to your Home Assistant?

Based on my very preliminary understanding, there are 3 options – a slightly custom Zigbee local polling implementation, a super simple wifi/cloud-based solution, or the out-of-the-box option (which only works with supervised installations).

I went with the middle option, and boy was that simple. Essentially, you add the devices using eWeLink app, and then add cloud integration to sonoff to your configuration.yaml like this:
sonoff:
username: !secret sonoff_username
password: !secret sonoff_password
sensors: [temperature, humidity, power, current, voltage, rssi]


Any time your Home Assistant is rebooted, it fetches an updated device list and generates entities for them.

Some basics about the configuration are detailed here: https://smarthomehobby.com/sonoff-home-assistant-integration/

Of the other options, the first one is described in these links:
https://www.digiblur.com/2020/07/how-to-use-sonoff-zigbee-bridge-with.html
https://community.home-assistant.io/t/sonoff-zbbridge-sonoff-zigbee-bridge-from-itead/187346

And the last – out-of-the-box solution – is introduced here:
https://sonoff.tech/product-review/tutorial/how-to-add-your-sonoff-devices-on-home-assistant/

How to add styles to pretty much any lovelace card?


By using Card Mod:
https://github.com/thomasloven/lovelace-card-mod

Here’s a sample:


A copy-pasteable version is in Appendix 1.

How to fix adding Foscam integration failing?

Foscam integration refuses to be added if you have a long, strong, beautiful password. Try changing it into something that’s 10 characters, tops, and won’t contain any exotic characters, and it’ll probably work.

Try adding a new account “test” with password “test” to verify, for example. And then change it to something a bit more sensible, but not too difficult, because… You know, Foscam.

What if my ClimaCell integration suddenly stops working?

That’s normal – all current (as of August 2021) Home Assistant versions that use the out-of-the-box integration is built originally for v3 of the ClimaCell (or Tomorrow.io) API. This causes a couple of issues:

1) If you originally configured your integration with v3, after your v3 subscription/plan expires, it can’t be renewed. See here for how to get a new one for v4 (after which you’ll need to reconfigure the integration):
https://www.koskila.net/no-way-to-renew-a-climacell-api-subscription-what-do

2) The out-of-the-box integration for ClimaCell is built to stay within 500 queries per day (the limit for v3). For v4, the limit is in fact just 100 – so the integration will only work for a few hours, and then fail fantastically (make all your entities unavailable). While we’re waiting for a graceful solution (see my issue on GitHub), as a workaround you can block access to ClimaCell APIs (api.tomorrow.io and data.climacell.co) using a firewall, save for a few hours a day (so you’ll still get some updates, but not constantly updated weather data – sorry).

Other Home Assistant -related posts:

(Well, this article AND others, to be exact – but that’s how WordPress works, so…)

References & appendices

Appendix 1 – sample

This sample shows how to use card-mod on a custom weather-card-chart.

type: 'custom:weather-card-chart'
title: Weekly forecast
weather: weather.climacell_daily
style: |
  div.main {
	display: none !important;
  }
  div.attributes {
	display: none !important;
  }
mm
5 4 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments