Fix Control4 light setup issues (#38952)
Fix Control4 light setup issues (#38952)

* catch KeyError and UnboundLocalError in light setup

* add check for no dimmer info from control4

* use existence of light_level data to enable dimming

* check if light data is not in dimmer and non_dimmer

* add item_variables logging

* add await to item_variables call

* add full item dump

* remove full item list

* change logging message

* fix typo

* reduce code inside try and add all entities at once

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <75ef9faee755c70589550b513ad881e5a603182c@koston.org>

* format with black

Co-authored-by: J. Nick Koston <75ef9faee755c70589550b513ad881e5a603182c@koston.org>
GenericStudent/home-assistant,lukas-hetzenecker/home-assistant,lukas-hetzenecker/home-assistant,titilambert/home-assistant,sdague/home-assistant,tboyce1/home-assistant,home-assistant/home-assistant,mezz64/home-assistant,w1ll1am23/home-assistant,tchellomello/home-assistant,home-assistant/home-assistant,turbokongen/home-assistant,tboyce1/home-assistant,turbokongen/home-assistant,Danielhiversen/home-assistant,tboyce021/home-assistant,w1ll1am23/home-assistant,tboyce021/home-assistant,tboyce1/home-assistant,soldag/home-assistant,aronsky/home-assistant,nkgilley/home-assistant,soldag/home-assistant,rohitranjan1991/home-assistant,toddeye/home-assistant,rohitranjan1991/home-assistant,adrienbrault/home-assistant,sander76/home-assistant,jawilson/home-assistant,titilambert/home-assistant,partofthething/home-assistant,sdague/home-assistant,tboyce1/home-assistant,GenericStudent/home-assistant,kennedyshead/home-assistant,Danielhiversen/home-assistant,kennedyshead/home-assistant,toddeye/home-assistant,balloob/home-assistant,balloob/home-assistant,aronsky/home-assistant,FreekingDean/home-assistant,sander76/home-assistant,adrienbrault/home-assistant,mezz64/home-assistant,rohitranjan1991/home-assistant,FreekingDean/home-assistant,tchellomello/home-assistant,partofthething/home-assistant,nkgilley/home-assistant,jawilson/home-assistant,balloob/home-assistant