diff --git a/src/components/features/composite/composite.tsx b/src/components/features/composite/composite.tsx index 69c3e87c9..9e4cd9011 100644 --- a/src/components/features/composite/composite.tsx +++ b/src/components/features/composite/composite.tsx @@ -13,7 +13,7 @@ type CompositeType = 'composite' | 'light' | 'switch' | 'cover' | 'lock' | 'fan' interface CompositeProps extends BaseFeatureProps { type: CompositeType; - parentFeatures: (CompositeFeature | GenericExposedFeature)[]; + parentFeatures?: (CompositeFeature | GenericExposedFeature)[]; stepsConfiguration?: Record; minimal?: boolean; showEndpointLabels?: boolean; @@ -39,8 +39,8 @@ export class Composite extends Component { - const { parentFeatures, feature } = this.props; - return isCompositeFeature(this.props.feature) && parentFeatures.length == 2; + const { parentFeatures } = this.props; + return isCompositeFeature(this.props.feature) && parentFeatures?.length == 1; }; onCompositeFeatureApply = (): void => {