2022.2: Let's start streamlining!

It’s 1am, so I will look tomorrow.
Tasmota is version 6, so I’m guessing it’s the changes to lights in mqtt. Looks like I have a weekend of tasmota upgrades.

Seeing the same thing.

So I notice the new default state is “unknown” rather than off. This means I suppose I will need to check all my automations in case I have made any triggers on state change from “off” to “on” as they will no longer work (at least the first time).

I don’t think there are any and checking is only a minor nuisance, but I do get a bit annoyed that the UI now shows these as “unknown” until first triggered.

3 Likes

Hey, thanks. It was state unknown. I actually deleted my post. It is late and I am cranky, my post was a little too negative.

One change I noticed is that 2022.2 is stricter regarding a template checking existence of a key in an MQTT JSON payload. For example, I used to do this (now incorrect):

{% if value_json.wind_avg_mi_h is not None %}

This check doesn’t return False when value_json.wind_avg_mi_h (as an example) doesn’t exist. It resulted in a dict_object error when wind_avg_mi_h was not included in rtl_433 payload. I changed to the following, which works:

{% if value_json.wind_avg_mi_h is defined %}

I should have used this more explicit and correct check anyway. Cool.

Great release – thanks to all who contributed.

That’s odd, the is not none shouldn’t have worked before if the key didn’t exist.

Same on both counts for me, same error and also going to hold off for a day or so :slight_smile:

1 Like

I originally got the idea to use is not none from:
Templating - Home Assistant (home-assistant.io)

  1. It is advised that you prepare for undefined variables by using if ... is not none or the default filter, or both.

Yeah, it’s just interesting why it worked and now doesn’t. I’m wondering if the data type changed on the integration you’re using.

Can anyone post an example of how I can create a button entity to run a script?
It’s also a little confusing the different use cases between button and input_button.

all my zwave lights stopped working with this release. other zwave devices worked, but the lights stopped. gave any error about not being able to add them to the light domain.
reverting to to 2021-12.10 fixed the light issue. using the old zwave integration.
anyone else confirm?

The legacy integration?

same thing for me. zwave works. but zwave lights dont work. going back to the last release fixed it.

It’s just the MQTT sensor integration reading messages from rtl_433. I have an RPI3 running rtl_433, using rtl_433 cli option to publish MQTT – something like this:

rtl_433  -F "mqtt://localhost:1883,user=$mqttuser,pass=$mqttpwd,retain=0,events=rtl_433[/id]" ...

I’ll see if I can learn more and identify what changed.

Thanks!

Hello, I just passed the configuration check and I get this error and therefore I can’t update:

Testing configuration at /tmp/config

INFO: homeassistant.helpers.storage:Migrating core.device_registry storage from 1.2 to 1.3

INFO: homeassistant.helpers.storage:Migrating

core.entity_registry storage from 1.4 to 1.5

Fatal error while loading config: [Errno 2] No such file or directory: /usr/local/lib/python3.9/site

packages/multidict-6.0.2.dist-info/METADATA

Failed config General Errors:

[Errno 2] No such file or directory:

*/usr/local/11b/python3.9/site-packages/multidict 6.0.2.dist-info/METADATA'

I don’t know what I have to change to be able to update, I need help. I have the last updated, so this is the next one. Thanks in advance

4 Likes

Like this:

template:
  button:
    - name: "Start my script"
      press:
        - service: script.my_script
1 Like

Thanks Tom!

Hard to tell from the docs what the difference is between button and input_button? Or when we would use one or the other?

yes correct. legacy.
as mentioned. all other zwave works. just not lights. previous stable version works.
also (and I realize you are not a github bug report, but wanted to mention it for anyone else searching)
restart server from the UI doesn’t work.
I have to manually stop/start or restart from the cli

I’d like to say that this update is awesome, and my gui seems way faster - although that is by no means scientific, just an impression.

Also restarts seem faster.

The template button has service(s) associated with it. The input_button does not. You have to monitor the input_button yourself, like with an automation trigger.

Use an input_button when you want to trigger an automation.

Use a template button when you want a service or services started with the button. Scripts are services.

2 Likes