2022.2: Let's start streamlining!

You just said it. It is only pressed, when it is pressed. Any other time it is UNPRESSED. So, still an ON / OFF condition :stuck_out_tongue:

Ok, so you actually grasp the problem, so not sure why

RF and IR triggered devices will never have a way to report their state, by instance…

That may be true for the switch but Home Assistant’s knowledge of the switch’s state can be unknown.

For example, tell me the current state of my home’s kitchen light switch. It might be turned on or off or maybe it’s missing because I am in the process of replacing it.

Unless I tell you its current state, you don’t know it for certain and, rather than guessing what it might be (and guessing incorrectly), the prudent choice is to state the fact that the switch’s current state is unknown to you.

Still, when HA starts, if it has no way to ask, it cannot tell if you’re currently pressing the button or not.

You ME types bring a whole new meaning to the word pedantic. If you guys still ran the world our phones would still be attached to the wall with a cord. :rofl:

Well, that is true. But, they worked, or they don’t. They were ON, or OFF. There was no UNKNOWN. :stuck_out_tongue:

And again, I do not argue here, just trying to share a different view.

I’m trying to explain, why people, using your software, sometimes do not understand the way’s, devs take to reach a goal. People who do not make software find things unlogic. And I can understand, where it come’s from.

But me myself, I evolved enough to understand your reasons and can work with your logic. Just a lot of others do not, because of the above mentioned differences.

So, no, I do not push anyone to do things the way I describe, just want to give you a view, that explains, why some people do not understand you. (and that means not me).

1 Like

And I don’t understand why you’re focusing on devs while Taras and I tried to tell you it applies to actual people as well, either remote or disabled.

I’m afraid you’re locked in a technical view, where you only take the switch point-of-view into account, not the world around it :stuck_out_tongue:

But anyway, enough with this rather pointless and philosophical discussion :slight_smile:

Same here. No data since Update.

This is the solution:

Home Assistant Release Candidate (beta)
That page updates when the beta is available (one week before the ‘stable’ release).
Yes, you can skip the upgrade and dont join the beta.

Hi there,

just updated to 2022.2.2. Since then, my auto entities are no longer available in Lovelace. I first reset to 2022.2.1.

Greetings Werner

Sometimes it is the cache that leads to problems with custom cards.

1 Like

OK. What can I do? Had restarted twice but didn’t help.

Had you emptied your browser cache?

1 Like

For those like me for whom the new ‘unknown’ state is an issue for their event-triggered binary sensor templates, there is a workaround (probably not the most elegant, but it works for me): you have to “bloat” your templates with an additional trigger event, homeassistant start and then test it everywhere else (not only in the state templates, but also in the attribute, icon ones).
Additional trigger:

    - platform: homeassistant
      event: start
      id: "ha_start"

Then test it in your template state, attributes (& icon):

      state: "{{ iif((trigger.id == 'ha_start'), 'off', 'on') }}"
      attributes:  
        attr_one: "{{ 'None' if (trigger.id == 'ha_start') else trigger.event.data['...'] }}"

Ideally, you could also add the trigger on the event event_template_reloaded.

All of that could be spared if there was an initial/assumed/starting/default value parameter added to the state, attributes, icon…

1 Like

Interesting choice of verb.

It’s a fairly common practice to include multiple triggers in a Trigger-based Template Sensor in order to ensure it reports a proper computed value at startup, reload, etc.

1 Like

That was the mistake. Thank you. :v:

Because, for the state at least, it was not necessary before (and again, what does this newly introduced change fix?) and would not be necessary if my last paragraph was considered.

1 Like

Another example that might help regarding button presses: I have an air purifier that has a button to set it to ‘Auto mode’. If I press the button on the remote or in HA, it just sends a command to set it to auto, even if it’s already in ‘auto’.

I can walk up to the purifier and change the mode by increasing or decreasing the fan speed, which would make it not be in ‘auto’ anymore, and mode would either be ‘low’, ‘medium’ or ‘high’. But the remote and HA both don’t know what state it’s in, all the button press does is send a command to make it ‘auto’ again.

So one way of looking at the difference between a button press and a momentary switch is that the button sends a command blindly, and the command doesn’t have to only be on or off. Whereas a momentary switch will just do the opposite of the devices current ‘on or off’ state

It brings parity to Template Sensors; other entities have always supported unknown.

Submit a Feature Request.