package io.openems.edge.io.shelly.shellypro4pm;

import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;

import io.openems.common.types.MeterType;

@ObjectClassDefinition(//
		name = "IO Shelly Pro 4PM Terminal", //
		description = "Implements a terminal of a Shelly Pro 4PM")
@interface TerminalConfig {
	@AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component")
	String id() default "io0";

	@AttributeDefinition(name = "Alias", description = "Human-readable name of this Component; defaults to Component-ID")
	String alias() default "";

	@AttributeDefinition(name = "Is enabled?", description = "Is this Component enabled?")
	boolean enabled() default true;

	@AttributeDefinition(name = "Terminal selection", description = "What terminal of the Shelly Pro 4PM is this terminal connected to?")
	TerminalEnum terminal();

	@AttributeDefinition(name = "Meter-Type", description = "What is measured by this Meter?")
	MeterType type() default MeterType.CONSUMPTION_METERED;

	@AttributeDefinition(name = "Invert Power", description = "Inverts all Power values, inverts current values, swaps production and consumption energy, i.e. Power is multiplied with -1.")
	boolean invert() default false;

	@AttributeDefinition(name = "Device-ID", description = "ID of the Shelly Pro 4PM device.")
	String device_id() default "io0";

	@AttributeDefinition(name = "Device target filter", description = "This is auto-generated by 'Device-ID'.")
	String Device_target() default "(enabled=true)";

	String webconsole_configurationFactory_nameHint() default "IO Shelly Pro 4PM Terminal [{id}]";
}