homeassistant

17563 readers
7 users here now

Home Assistant is open source home automation that puts local control and privacy first.
Powered by a worldwide community of tinkerers and DIY enthusiasts.

Home Assistant can be self-installed on ProxMox, Raspberry Pi, or even purchased pre-installed: Home Assistant: Installation

Discussion of Home-Assistant adjacent topics is absolutely fine, within reason.
If you're not sure, DM @GreatAlbatross@feddit.uk

founded 2 years ago
MODERATORS
1
85
submitted 6 months ago* (last edited 6 months ago) by NarrativeBear@lemmy.world to c/homeassistant@lemmy.world
 
 

Hi there!

Let's gather all those recent inspiring Home Assistant dashboards that you have been working on into one thread.

Show off you creative layouts, and card choices, to hopefully give both new and current users ideas for their own setups!

Let's inspire one another! 😊

2
 
 

Any experiences with measuring the water level in a well? My well is less than 5 Meters deep and 20 Meters from the house (no electricity available (yet, but who knows)

3
 
 

Pocket-TTS seems to be a TTS server that returns audio much faster locally than Piper, so I built a container that enables it via Wyoming protocol and zeroconf to be available in Home Assistant.

There is the ability to use an audio snippet to clone a voice that would be used by pocket-TTS, I haven't enabled anything like that yet. PRs welcome.

4
5
 
 

I never asked for "Lights" or "Security" and many other boards in my sidebar. Even worse, they seem to be getting more. Home Assistant used to feel clean to me, now I get Facebook vibes and a touch of devs way overstepping.

I read the only absurd solution is per device hiding of useless unremoveable dashboards and yet find users for years now asking to remove crap-dashs for good.

I have only one user (admin) and webinterface and would never ever like to see this ugliness again. I think it is overbearing, intrusive and invasive as Home Assistant doesnt give choice anymore to the user.

How can i fully remove the dashboards Lights, Security, Climate and Energy?

6
 
 

I thought I'd share this tip, since I just found it a few weeks ago, and I thought maybe newer people might have overlooked the value of it. You can create a custom macro template for things that you use more than once.

For example, I use the sports tracker integration to track three teams. Then, I have conditional cards that start to appear the day before a game and stay visible through 16 hours after the game starts (i.e., showing the final score for a few hours into the next day).

This is a fairly complex example, but the complexity also demonstrates why you'd want to extract this out to a macro. Imagine having this repeated in 3 places (in my case), then realizing there was a bug, or you could improve it by just changing one little thing...With the macro, edit it in one place, reload the macro template, and boom, the change shows up everywhere you use the macro!

In /homeassistant/custom_templates/sports.jinja (I believe I had to create that directory, and the file), I have this code:

{% macro format_date(entity_id, interval) %}
{% if is_state(entity_id, "POST") %}
{{ state_attr(entity_id, "clock") }}
{% else %} 
    {% if is_state(entity_id, "PRE") %} 
        {% if as_timestamp(state_attr(entity_id, 'date')) | timestamp_custom("%d") == as_timestamp(now()) | timestamp_custom("%d") %}
{{ as_timestamp(state_attr(entity_id, 'date')) | timestamp_custom("Today at %-I:%M %p") }}
        {% elif as_timestamp(state_attr(entity_id, 'date')) | timestamp_custom("%d") == as_timestamp(now()+ timedelta(days = 1)) | timestamp_custom("%d") %}
{{ as_timestamp(state_attr(entity_id, 'date')) | timestamp_custom("Tomorrow at %-I:%M %p") }}
        {% else %}
{{ as_timestamp(state_attr(entity_id, 'date')) | timestamp_custom("%A at %-I:%M %p") }}
        {% endif %}
    {% else %}
{{ state_attr(entity_id, "clock") }} {{ interval }}
    {% endif %}
{% endif %}
{% endmacro %}

The macro line has two variables specified - the entity to use (in my case, sensor.capitals from the integration), and the "interval", which is only used to fill in whether it's a "period" or a "quarter" for the game. (I could have if/thens to figure it out from the attribute data, but just passing it in is really easy.)

There's a lot going on in this macro, mostly specific to the sports integration, but here's an overview:

  • If it's postgame, then just put up the "clock" attribute, which will have something like "Final" or "Final/OT", etc.
  • If it's pregame, then it checks if the game is today, and if so, it says "Today at 7:00 pm" or whatever. If it's tomorrow, it says, "Tomorrow at 7". If it's beyond tomorrow, it gives the day of the week and the time.
  • If it's during the game, which is the only other option, put up the current clock info and whether it's a period or quarter.

Next, let's look at how to use it. Here's the yaml for the hockey team card:

  - type: custom:mushroom-template-card
    primary: >-
      {{ state_attr("sensor.capitals", "team_abbr") }} {{
      state_attr("sensor.capitals", "team_score") }} - {{
      state_attr("sensor.capitals", "opponent_abbr") }} {{
      state_attr("sensor.capitals", "opponent_score") }} 
    icon: mdi:hockey-puck
    features_position: bottom
    entity: sensor.template_away_team
    visibility:
      - condition: or
        conditions:
          - condition: state
            entity: sensor.capitals
            state: IN
          - condition: and
            conditions:
              - condition: state
                entity: sensor.capitals
                state: POST
              - condition: numeric_state
                entity: sensor.caps_hours_until_next_game
                above: -16
          - condition: and
            conditions:
              - condition: state
                entity: sensor.capitals
                state: PRE
              - condition: numeric_state
                entity: sensor.caps_hours_until_next_game
                below: 49
    secondary: |-
      {% from 'sports.jinja' import format_date %}
      {{ format_date('sensor.capitals', 'period') }}
    picture: "{{ state_attr(\"sensor.capitals\", \"team_logo\") }}"

The primary shows the score and the teams, and you can see the visibility that I hopefully described correctly before. But, look at the secondary spec: The first line tells it what file you saved that jinja code in and the macro you want to use, and the second line calls the macro.

That's it!

And if I want to change it, I only have to change it in one place, and then remember to re-load the custom templates by invoking the "homeassistant.reload_custom_templates" action (note this doesn't show up on the YAML page on the developer tools - you have to trigger it on the Actions page).

Note that I'm using it in the secondary info, but it could be used anywhere that takes a template - such as the primary in this card. For example, I could write another macro to format the teams such that the home team is always second...and I probably will at some point.

This info is in the Reusing Templates section of the Templating page on HA's website, but I overlooked it for a long time. Hopefully this tip helps someone else.

Where it would have been really helpful is that I have quite a few sensors that measure how many days since I changed water filters, cleaned the pet's recirculating water bowl, did flea and tick treatment on the pets, exercised the generator, drained and repressurized the pressure tank, changed the batteries in my pinball machine, etc. etc. etc.

So, I have quite a few templates that use a helper for the last date I did something, then count how many days since then...and they're all coded independently in my configuration.yaml (these were done before the UI helper interface was as useful as it is now). And even though all of those do essentially the same thing, I coded some of them differently for various reasons along the way. It's a mess, no question. I could recreate all of them with one short macro.

Had I noticed this macro ability a few years ago, when I first started, I could have saved myself a lot of headache!

7
 
 

I keep having my home assistant freese when I try and activate HAV, been debugging it but didn't found anything yet to solve it.

Buttttt...

What I did find is an easter egg in the source code. It's "HA" in morse code. If you put that into the main button on the device it activates something :)

8
 
 

I'm currently in the process of creating a Zaparoo integration for home assistant and I'm looking for some feedback. If you're not familiar with the project, Zaparoo is the open source universal loading system that lets you launch games and media instantly using physical objects.

What this integration allows you to do from home assistant is launch and stop games, query currently running media, and listen to Zaparoo notifications to trigger automations (eg. if I launch Point Blank on the Mister, turn of the Christmas tree).

As of right now there is no branding (pull request is open to the brands project) and requires installing as a custom repository or manual installation.

9
 
 

Can anyone help with pointers for automatable garage heaters? So far my searches aren’t finding anything. My requirements are:

  • remotely preheat when I want to work out
  • alert if it’s left on, or automatically turn off

I’m in the US, looking for 240v maybe 5,000w electric heater. The basic item is cheap and readily available at home centers or online. I even see variations with Bluetooth remote and/or controlled by app.

I’m looking for something locally automatable. Matter/Thread would be ideal but I’m fine with Zigbee or z-wave. But I’m not finding anything like that, and getting stuck on some vendors portal is not ok. Any leads?

Or something that can use an external thermostat - I actually have an extra Ecobee - that can be locally automatable. Any leads? Any search tips that might find such a thing?

I briefly thought of automating an outlet, however even if smart outlets are available for those loads, that wouldn’t work because all these heaters have a safety feature to run the fan until the unit is cool

10
 
 

Hello Plex / Home Assistant community!

I used to post regularly with Plex related projects to Reddit but since leaving I figured I'd try sharing my latest project here instead

My latest project, in an effort to decouple my smarthome setup from Alexa, is to recreate the functionality provided by the Plex Alexa skill so I can play things to my various Plex clients with voice commands in Home Assistant (plus I assume like all things I enjoy Plex will eventually EOL this anyway)

I mostly made this for my own personal usage initially but decided to make it into a blueprint and share

https://github.com/mdhiggins/PlexVoiceAssistant

I have a few other Plex/*arr related projects if you check out my Github

Hope others find value in this as well but its working nicely in my home setup

11
13
Smart Lock (lemmy.zip)
submitted 1 month ago* (last edited 4 weeks ago) by Foni@lemmy.zip to c/homeassistant@lemmy.world
 
 

I'm looking for a smart lock for my house and I've seen these at a pretty interesting price on Aliexpress (https://a.aliexpress.com/_mMbQRZx), it says that it can be controlled with the tuya app and I have some old plugs integrated from that app, but I also have a lamp that connects to that app but not to the home assistant. Does anyone know if I will have problems integrating this lock into my system? Does anyone have this model or similar?

thanks for the help

EDIT: Thank you all for your responses and help, this is a fantastic community.

I just want to tell you that security is not an issue for me right now, it is much more the combination of price/comfort and not depending on third parties whenever possible.

In any case, I have learned a lot from your answers and I took away important ideas to consider before making a purchase.

12
 
 

I have a button that triggers a script for bedtime to turn off all lights, and, if pressed again, checks to see if all lights are off and if so, turns a few (like the bathroom light) on.

My problem is one or two of the lights (connected via Zigbee2Mqtt) are often powered off at the switch on the lamp, meaning HA still sees them as "on" until the power is restored and they can be turned "off" via the app. The lights cannot be turned "off" (in HA) manually.

Is there any good solution for detecting when a light goes missing and turning it "off" in HA?

13
 
 

I'm attempting to add a no-name chinese solar wifi soil sensor to my HA server and have a couple questions. I was able to pair the device to the Smart Life app, add the Tuya integration to HA, link my Smart Life account to the HA integration, and recognize the device from that integration.

The device in the Smart Life app shows sensor readings for temperature, moisture, and nutrient levels, but the only sensor reading available in HA is temperature. So I guess I have 2 questions:

  1. How to get HA to recognize the other sensors from this device?
  2. Is there any way directly connect a device like this to HA without linking to a Smart Life account?
14
 
 

So I moved a few months ago, and only just now had time between work and school to set up my smart home again. Which turned out to be a sort-of blessing, since HA did some updates and the one for sensor and binary sensor templates dramatically screwed me as I template a lot. It also gave me the opportunity to upgrade my Yellow's Pi module, and I found (though haven’t installed) an internal z-wave module for it, which I'll do when I'm off for Christmas and New Year.

However, since I am starting fresh, I thought I'd ask around on best practices. So I use the Orbi Pro 6 which has three primary and one guest SSID, and I have it behind a Google router in its DMZ because we have Google Fiber here. Which also turned into an advantage because I wanted to a.) do full IoT isolation and also b.) have someplace to put my singleboard computers and my servers that's safer but still have internet access plus c.) avoid wifi congestion (three VLANs plus the primary router's wifi takes care of that nicely).

On the Orbi: VLAN1 is primary and where I keep my singleboard computers, my servers, two TVs, X-Box, Switches, and my laptop. VLAN2 is for IoT hubs, cameras, Roomba, etc. VLAN3 is strictly lightbulbs, which sounds ridic but when I did a wifi analysis they really really super really take up a lot of wifi bandwidth, I've been slowly replacing with Hue and other zigbee, but it's in progress. I may move the cameras there as well.

What I need to figure out is the best way to connect everything to Home Assistant. What I was doing was attaching Yellow to VLAN1 by ethernet and VLAN2, VLAN3, and the primary SSID by wifi. On the Orbi router is an mDNS gateway page so I set it to connect my VLANs so they can exchange some data.

But now I have some time to design, and also, I can run multiple instances of HA on one of my servers. I had been doing that anyway to test any chances and test and run Add-ons that I wrote myself, just not a permanent one (again, test instance; I murdered it a lot and spun up a new one when things got weird).

So for anyone who deals with multiple SSIDs or VLANs (or just has an opinion): keep Yellow as is or go with the multiple instances and use Remote Home Assistant (which I used with my test instance and it worked very well) to send entities in the VLANs back to Yellow? Anyone?

15
 
 

A while back I ditched Windows for Linux desktop (long time Linux user, just not desktop) because I've learned to hate Microsoft.

I have 2 Sengled WiFi bulbs that I thought were useless now that Sengled is dead (although the app seems to be able to login again now, I'll never trust it). But then I found Sengled Tools which, among other things, documents a very simple way to communicate with Sengled bulbs using JSON over UDP. The sample light custom component is only ~100 lines of Python and adding the UDP and JSON from Sengled Tools would be maybe 50-100 more. I took this as an invitation to improve my Python and rescue the bulbs so I started reading up on Home Assistant development.

I now have this overwhelming VS Code install with devcontainers etc. etc. which seems crazy overkill for the task at hand and I really resent AI being shoved in my face every time I try to do something - especially when the main purpose of the exercise is to learn.

I run Home Assistant in a VM and I worked out I can virsh console hass and then docker exec -it homeassistant sh. I think there's maybe a sshd addon I could use and there is also the File Editor addon.

I guess I've answered my own question, and maybe I just wanted to have a rant about being "forced" back into the Microsoft ecosystem in order to develop for Home Assistant - but I would be interested to learn about other options.

Edit to add my solution for anyone that might come across this post in the future:

As usual, I rushed in without reading the documentation properly. I just started reading from the top and following the VS Code instructions. If I had scrolled down the page a bit I would have found the "Manual Environment" section. There are no instructions for my specific distribution, but it was clear enough that it could easily be adapted. I now have a copy of Home Assistant that I can simply run in a terminal and kill and restart etc. without impacting my "production environment". I've already installed vscodium, so will probably keep using it, but if I read the instructions properly I would probably just use vi.

16
 
 

So, I have an automation that checks the month and applies a scene accordingly. I could never get it to work quite right though. Every time it was supposed to trigger a specific scene, it would just default to a base scene. I ran it through DDG AI and it found a single line that was causing the "choose" to fail and defaulted to the default scene. Not a fan of LLMs/AI but this actually helped.

17
 
 

I still have trouble understanding how to add an MQTT device without YAML. It seems there's an elaborate GUI flow made to deal with this, so why is this so complicated?

I have MQTT messages coming in. Their topics are e.g.

wx/temperature wx/humidity wx/light_lux wx/rain_mm wx/wind_dir_deg

How do I tell Home Assistant to just add the bloody device, and let me configure units afterwards and not type out 600 lines of YAML manually?

18
 
 

I'm completely out of the smart lights loop and I'm looking for light bulbs that allow me to set brightness, color temperature and possibly the color in general using HA.

I see a lot of people recommending zigbee bulbs, which is fine, I just need to buy a dongle, but I already have an isolated wifi network with no internet access that I use to control smart stuff from my home server, so something with wifi would be ideal. I want something that I can just screw in and control from my server with no proprietary apps needed for the initial configuration.

Can you give me some recommendations?

Thanks

19
 
 

TL;DR: How do I make the thermostat send a 'heat' request to the boiler without making the boiler use way too much gas?

Hi all,

I have a question about automating central heating. My current setup:

Ground floor:

  • Main thermostat linked to boiler (Honeywell T6 on WiFi through Honeywell integration)
  • One radiator with Sonoff TRV-ZB, zigbee
  • Three radiators with non-smart knobs that are usually open
  • The main room has a Sonoff Presence sensor

First floor:

  • Three rooms that can be occupied with Sonoff TRV-ZBs.
  • Two of three rooms have Sonoff Presence sensors

All rooms that can be heated smartly are controlled through a blueprint once shared here called 'Advanced heating control V5'.

I have a helper called 'Comfort Temp' which is a slider that controls the setpoint on the main thermostat and the TRV of an occupied room.

So the obvious question is: is there any good way to get the main thermostat to send a heating request to the boiler?

I've seen something about a WiFi module that you can put in between the main thermostat and the boiler that offers more control (Nodo OpenTherm Gateway, OTGW). Does anyone have experience with this? Or do I solve this with more TRVs on my ground floor? I've heard about central heating systems not enjoying a fully thermostatic valved circuit. More TRVs also means I have to replace the valves on a couple of radiators.

Any advice would be greatly appreciated!

20
 
 

I have recently enforced a better privacy practice for my smart home devices, that includes creating a new access point for those devices and blocking them of internet access with VLAN.

Since then, my yeelight minas celiing lights goes unavailable whenever I physically switch them off and turn them on afterwards.

One really stupid thing is it needs internet access for using LAN control feature. it's really really dumb.

but at the same time, in this kind of age where everything wants to phone their home, i need to somehow mitigate this in every possible way such as by fooling the devices as if they have access to the internet.

Is this kind of things possible?

thanks!

21
 
 

I am rebuilding my system and I have a few questions related to network set up. I have installed a new Unifi system, set up IoT VLAN and opened port for HA. That part I THINK is right. My questions lie with setting up DuckDNS and Let's Encrypt. I plan on doing more self hosting stuff in the future. Can/Should I be doing things like Dynamic DNS and certificates via an entity outside of HA such as my router or some other container in the "system" or is it better to handle HA's requirements inside of HA itself?

Additionally, in my current config I can only reach the HA brain via the DuckDNS URL. What sort of set up is required to have the unit accessible when the internet is down? Seems with the mobile app it is the URL or nothing. What do I need to be doing for internal access when on local LAN?

I am running it on the HA Blue hardware and I plan to rebuild from scratch if that matters. I am sketchy on the network set up and making sure things are all secure. Bit paranoid lol. So if you have any good set up guides on this portion it would be appreciated. Thanks.

22
 
 

Here's how to automate an Itho mechanical ventilation unit (e.g. CVE ECO 2SP) to auto adjust ventilation speed according to bathroom humidity levels.

All thanks to Arjen Hiemstra's Itho WiFi add-on module (Dutch), and Home Assistant.

23
 
 

We bought a house! And with it, an Itho mechanical ventilation unit that did not yet auto adjust ventilation speed according to bathroom humidity levels.

So, I automated it! See my blog post for details: https://kroon.email/site/en/posts/home-assistant-itho-cve/

All thanks to Arjen Hiemstra's Itho WiFi add-on module (Dutch), and @homeassistant

#homeassistant #opensource #ithodaalderop

24
25
 
 

Wife gave me a heads up that she expects we'll get a Roomba from her parents for Christmas - most likely a Roomba Max 505 or 705 (or the Costco variations on those).

Looking at the Roomba Integrations page for HA, I saw this line:

It currently does NOT work with the newer x05 Wi-Fi models, such as Roomba 105, 405, and 505

I was wondering if anyone had tinkered with any of those candidate models and had any success getting them to work with HA?

view more: next ›