Adventures with Home Assistant - 2021 Edition

Hi all!

I first trialled Home Assistant a few years ago with hassio and an older HA version which I never really got to grips with and gave up, my main gripe was how difficult it was to create the custom dashboards to really make it look like a professional system. I recently decided to give it another go and I am so impressed with how much easier things have become. It’s not quite ‘easy’ as such yet and I’ve required a bit of help from the forum but in a single day I’ve got this far (ok two days if you include getting HAOS running in a VM with USB pass-through). This is all without using ANY custom modules/code and all configured with the GUI (with the exception of a little YAML for the dashboard entities and automations).

Features so far:

  • Full home dashboard (looking AMAZING using just Lovelace)
  • Integration with Ring Alarm (ringMQTT), Hue, Nest Thermostat, deCONZ Zigbee (with Conbee2 adaptor)
  • Icons to show alarm sensor states (doors, windows, motion sensors)
  • Per-room heating controls (although the actual temp values are currently all bound to the single Nest thermostat)

Things not completed but I think I know how to do:

  • Per-room temperature and humidity sensors (just waiting for the Tuya Zigbee sensors to arrive from China)
  • Per-room heating output control (waiting on Tuya Zigbee TRVs to arrive from China)
  • Master heating demand control - this will regulate the boiler demand based on the aggregate of the rooms demand levels. In the first instance I intend to just use the Nest thermostat to control the boiler state by forcing the set-temp on the thermostat higher than the current thermostat temp value, but in future will investigate the OpenTherm gateway integration to more finely control the boiler output level.

Things I want to do but not sure how (please chime in if you can help!)

  1. The background images are currently staticly created in GIMP from photographs with a 70% transparency black overlay. Is it possible to apply the ‘shading’ overlay progamatically with a style? I would love for the images to be slightly lighter when the lights are on and darker when the lights are off.
  2. The leaf icon is supposed to set the room temp to an ‘economy’ state (i.e. 17 degrees) but for some reason I cannot get the icon click action to do this. See here if you can help.
  3. Master lighting switches for Downstairs, Upstairs, Whole House. Wanting to stick with the GUI capabilities I didn’t want to create custom groups and have to manually maintain them. Is there any way to acheive this based on the ‘Area’ property of the lights? Or collections of Hue Groups somehow?
  4. The lightbulb icons on the cards are linked to Hue Groups, the color of the icon is tied (rather cool I admit) to the scene state of the Hue group, so for example in the image the Lounge is showing blue/purple as that’s how the room is lit. I actually don’t want this as some scene colors are hard to see on the dashboard and are very close to the ‘off’ grey color, I just want it yellow for ‘On’ and grey for ‘Off’. Can I override this somehow?
  5. Electric gate control. Don’t know where to start with this one… my gate is controlled using a fairly standard 433mhz ‘rolling code’ gate transmitter. Presumably some sort of hardware gateway is needed. Any clues?
  6. Per-room heating schedules. Currently trying to assess the various Scheduling options out there, rather than an on/off schedules, I want a schedule that sets the Room Set Temp to a specific value at various points through the day (similar to the schedule interface on the Nest Thermostat App) - if anyone has clues to the best tool for this, please share.

Thanks to the HA team and to several forum users for the help already:
@sheminasalam @mobile.andrew.jones

Looking forward to expanding this further!

1 Like

You can have CSS applied on a state basis - Picture elements card - Home Assistant so you can apply brightness etc to the picture based on the state. Or - you can have a different on and off state image: Picture elements card - Home Assistant

#2 - I have replied see that topic.

Hopefully someone else will come along and answer this, as I doubt you are the only person who wants to know this. Though I suspect it is going to involve the creation of templated lights. Failing that you could simply use a button for the area and use a service call - you can turn off entire lights by area.

tap_action:
  action: call-service
  service: light.turn_off
  service_data: {}
  target:
    area_id: "{{ area_id('living_room') }}"

For example - if you don’t already know the area id, if you do (or if you went to the areas page in the configuration and copied the area id) you can simply paste it in:

tap_action:
  action: call-service
  service: light.turn_off
  service_data: {}
  target:
    area_id: e5bc628a4b6246edb87cb986144a32cb

There are a few different RF options for #5 , I personally use the USB Stick RFXComm433trx, but people will probably suggest the Sonoff RF Bridge or something similar.

Heating Schedules. I cannot recommend Schedy enough, I use Schedy to control my boiler and it makes life so much easier. My heating is altered based on time of day, whether the room is occupied, what the temperature outside is, is it raining, what direction the wind is, whether the house is in night mode and even what season it is. Give Schedy a look, and give me a shout if you need a hand. Getting Started — hass-apps 0.20200319.0 documentation

Thanks again for the input… this is going to seem like a dumb question I’m sure but the documentation simply states:

How to use state_filter

Specify different CSS filters

state_filter:
  "on": brightness(110%) saturate(1.2)
  "off": brightness(50%) hue-rotate(45deg)

How do you tell it WHICH entity to get the on/off state from?! Picture_element cards don’t have an entity, but rather a list of elements.

It’s a perfectly reasonable question, and the documentation doesn’t really clear that up. However, since all the other things that sit on top of a picture elements card have an entity field, I am going to guess that sticking in an entity field in at the top level, pretty much after the image, will be worth a go?

In a quick test on my dashboard (using the demo floorplan because I don’t have one of my own), I have verified that both of these work:

type: picture-elements
elements:
  - type: state-badge
    entity: binary_sensor.updater
    style:
      top: 32%
      left: 40%
entity: binary_sensor.bedroom_presence
state_image:
  "on": https://demo.home-assistant.io/stub_config/floorplan.png
  "off": https://demo.home-assistant.io/stub_config/floorplan.png
state_filter:
  "on": "brightness(100%)"
  "off": "brightness(25%)"

The work separately, or together.

1 Like

Brilliant, another challenge solved! I spent the last 10 minutes trying to put the state_filter with the entity field inside the element and getting nowhere.

1 Like