Custom PS3 Integration: Issues with config flow

Hi all!

I am having some issues with my config flow. I added a SelectSelector (dropdown) to select a script in further functionalities in the integration. This is optional however.

I am now facing the issue that if I don’t select any script, I get the following error:

image

I suspect this is because of some constraints in the SelectSelector class as I have made it an optional field. Is there any way to circumvent this? The code for the config_flow can be consulted here: ps3-home-assistant/custom_components/ps3/config_flow.py at 0ec9c641076a5c5a2cff480ebfc68c0ea39e6102 · SDR3078/ps3-home-assistant · GitHub.

Thanks!

Don’t set a default value in your selector. So just:

                    vol.Optional(TURN_ON_SCRIPT): SelectSelector(
                        SelectSelectorConfig(
                            options = [value.unique_id for value in self.hass.data["entity_registry"].entities.values() if value.platform == 'script'], 
                            mode = SelectSelectorMode.DROPDOWN
                            )
                        )

I am getting this same error when trying to add your ps3 integration to my install, I cannot get past this screen. I have even added the ps3 folder to my config/custom_componenets folder but nothing works.

@msp1974 thanks again for the solution!