Well, I deleted the line that emits the event and guess what happens: nothing! ![]()
It works just fine, the app won’t even nag you with the non initialized attributes. In the AWA they just show as blank.
I even created an automation with one of the buttons without touching the other one, and it works fine.
It looks like that line is not needed and only brings trouble when the device is re-added.