I’m writing my first integration. And got everything working like it should do. But when I start implementing a service for the integration I cannot load my config of my integration. I tried using hass.conf.[DOMAIN][“key”] and different tries on the hass en configEntry objects without any luck. I already have a sync_setup_entry where I can load my configuration but when I add the service their it does not show up. So I placed it back to the setup() function (where it should be if the documention is still correct) but there I cannot load my configuration.
def setup(hass: HomeAssistant, entry: ConfigEntry) -> bool:
def handle_manual_level_set(call: ServiceCall):
service: renson.RensonVentilation = renson.RensonVentilation(
#place where I need to config
)
level = call.data.get("manual_level", "Off").upper()
service.set_manual_level(rensonEnums.ManualLevel[level])
hass.services.register(DOMAIN, "manual_level", handle_manual_level_set)
return True
How can I get my config (I implemented the config flow for my integration) in setup() method?