2021.5: Stability, performance, triggers, color modes!

I can’t get HA to update from 2021.5.2 to 2021.5.5

Supervisor error:

21-05-26 01:35:49 ERROR (SyncWorker_7) [supervisor.docker] Can't create container from homeassistant: 409 Client Error for http+docker://localhost/v1.40/containers/create?name=homeassistant: Conflict ("Conflict. The container name "/homeassistant" is already in use by container "9aa827e6d6351f48d61f97bd49f1d78ad759bcf65c776c7952d7cdd733e10224". You have to remove (or rename) that container to be able to reuse that name.")
21-05-26 01:35:49 INFO (MainThread) [supervisor.resolution.module] Create new issue IssueType.UPDATE_FAILED - ContextType.CORE / None
21-05-26 01:35:49 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-3318' coro=<process_lock.<locals>.wrap_api() done, defined at /usr/src/supervisor/supervisor/utils/__init__.py:24> exception=HomeAssistantUpdateError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/utils/__init__.py", line 33, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 107, in wrapper
    raise err
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 105, in wrapper
    return await self._method(*args, **kwargs)
  File "/usr/src/supervisor/supervisor/homeassistant/core.py", line 240, in update
    raise HomeAssistantUpdateError()
supervisor.exceptions.HomeAssistantUpdateError

This is running HA OS on a NUC.

Any ideas?

I have same problem.

See ludeeus’s response below the post you replied to.

Don’t be silly, people don’t read solutions.

1 Like

Hi, I have the same problem, also resolved by downgrading to 2021.5.1. Did you investigate this further?

pip install graphql-subscription-manager==0.3.6

I’m haing the exact same issue… did you manage to sort it out?

Hello all! Thank you for this update. It has allowed me to do something I’ve wanted to for over a year:

Create a “sensor” that turns on and off based on the Daytime High and Overnight Low temperatures, then pass these “sensors” on to HomeKit (which show up as Occupancy sensors) to allow for thermostat Automations in the Apple Home app.

It took me quite a few days (probably easy for a more advanced user…) to figure out how best to leverage the triggers, so I thought I would share my experience and some of the configurations below.

Tools Needed:

I currently use the DarkSky weather tool to detect these values:

  • sensor.weather_daytime_high_temperature_0d
  • sensor.weather_overnight_low_temperature_0d
  • sensor.weather_temperature

Code in my configuration.yaml for DarkSky setup:

sensor:
# Weather Prediction
  - platform: darksky
    api_key: ---KEY---
    name: Weather
    forecast:
      - 0
    monitored_conditions:
      - temperature
      - temperature_high
      - temperature_low

With this release, I was able to create the following Template Trigger in my configuration.yaml:

template:
  - trigger:
      - platform: time_pattern
        minutes: "/30"
    binary_sensor:
      - name: "Hot Day"
        state: >-
          {% if states('sensor.weather_daytime_high_temperature_0d')|float > 22 %}
            true
          {% else %}
            false
          {% endif %}
        device_class: heat
        auto_off: 300

      - name: "Cold Day"
        state: >-
          {% if states('sensor.weather_daytime_high_temperature_0d')|float < 22 %}
            true
          {% else %}
            false
          {% endif %}
        device_class: cold
        auto_off: 300

      - name: "Hot Night"
        state: >-
          {% if states('sensor.weather_overnight_low_temperature_0d')|float > 16 %}
            true
          {% else %}
            false
          {% endif %}
        device_class: heat
        auto_off: 300

      - name: "Cold Night"
        state: >-
          {% if states('sensor.weather_overnight_low_temperature_0d')|float < 16 %}
            true
          {% else %}
            false
          {% endif %}
        device_class: cold
        auto_off: 300

The configuration above creates a Trigger that runs every 30 minutes and checks the Daytime High and Overnight Low temperature and sets the appropriate binary_sensor to “on”, then turns them off after 5 minutes (300 seconds).

This update allowed me to turn them “off”. Previously, I did not have an automated way of turning the sensor “off” after it was triggered without rebooting HA or manually setting the sensor’s state to “off”. The reason I needed to turn them off was to allow for HomeKit to detect that the sensor had been turned “on” to run the Automations.

I use HomeKit Automations to run the AC or Heaters based on:

  • if someone is home or not (different temperatures are set for Home vs Away)
  • the time of day (Daytime or Nighttime) and
  • if the specific sensor (Hot or Cold) is triggered for the time period.

I am certain there is probably an “easier” way to do this and that I can further clean up the configuration above, so I am definitely open to suggestions. Also, if you would like to see the Scenes and Automations I have in HomeKit, I can take screenshots and share. Please just let me know.

I know this was a fairly longwinded post, but I thought it might be useful to someone out there. Thanks for reading!

1 Like

Read the thread.

FYI new users won’t be able to follow your steps. As the doc on darksky says at the top Apple is shutting down the Dark Sky’s API at the end of 2021 and it will not accept new registrations.

Anyone that has an API key already can do what your showing and it will keep working until the end of the year. But anyone who doesn’t already have an API key can’t get one and thus can’t do your steps. Might want to consider modifying it to use a different source for that weather data.

1 Like

That’s a good point @CentralCommand. I will have to update my weather service from DarkSky, but the triggers should still work when I replace the weather service.

Indeed, I’ve had to develop some very convoluted things to meet criterial like “recently arrived home but haven’t been home for too long”…

So how serious is it if I rebooted during the database upgrade?

I was making rounds with patching systems and without thinking rebooted my hypervisor after some updates broke network connectivity…and didn’t even think about the fact hassio was “probably” still doing the DB upgrade until I saw it stopping the VMs by which time it was too late.

I’m experiencing the same problem since 2021.5 too. 2021.6 hasn’t resolved it either.
The ESPHome color_interlock isn’t playing nicely with HA.
I notice a bug was raised against ESPHome for this issue - https://github.com/esphome/issues/issues/2046

1 Like

Hi, apologies for the delay

still the same issues with every release, wipe erase and restart again with ZHA. starting to get really fed up with this now

Hi

I’m on the latest version and looking at this particular update, my lights (mixture of osram zigbee rgbw and yeelight wifi rgbw) are supposed to have the following layout. But it doesn’t. How come?

What I should now be seeing:

What I’m still seeing:

I have this exact same error of recent. Did you resolve it?

Furthermore the color spot always on the center on the white spot when I open it regardless of the actual color. I use Yeelight.

Can mutesync work via a cloud connection (nabucasa)? I ask because of work laptop tunnels all network traffic through VPN (no local IP access at all).

I have been struggling to find a way to get my microphone status into home assistant to drive an indicator light outside of my home office door. I just discovered mutesync today and it gets me halfway there, but same as you I can’t use it on VPN.

I’ve been searching solutions and one idea I had was to come up with a script running on the computer that is running mutesync, and query the status and send out a webhook to HA.

Since the integration runs this, I figure if someone knew python well enough it would be (hopefully?) trivial to modify it to query 127.0.0.1:8249 and send the data out over an HTTP POST request to the HA server.

With this method it is pushing the mutesync status to HA, and would work as long as the computer has internet access, VPN or not.

I haven’t learned python yet but this might be the kick I need to start messing with it.

1 Like