public static IHomeAssistantMqttConfigurationBuilder AddLight( this IHomeAssistantMqttConfigurationBuilder configurationBuilder, ILightMqttEntityConfiguration mqttEntityConfiguration) { configurationBuilder.TryRegisterEntityBindingManager <ILightMqttEntityConfiguration, ILight, ILightEntityDefinition>(); configurationBuilder.ServiceCollection.AddSingleton(mqttEntityConfiguration); return(configurationBuilder); }
public static IMqttEntityControlPanel AddLight(this IMqttEntityControlPanel controlPanel, ILightMqttEntityConfiguration configuration) { controlPanel.AddStatefulEntity <ILightMqttEntityConfiguration, ILight, ILightEntityDefinition>(configuration); return(controlPanel); }