Fieldset::make('Power')
->relationship('state')
->schema([
Select::make('requested_power')->label('Power input request')
->reactive()
->afterStateUpdated(function (?Model $record, $state) {
/* @var Device $record */
$this->getMQTTBroker()->publish(new SetInputPowerMessage($record, $state));
})
->options([
'0' => 'Fixed 5V@5A',
'1' => 'Fixed 9V@5A',
'2' => 'Fixed 12V@5A',
'3' => 'Fixed 15V@5A',
'4' => 'Fixed 20V@5A',
]),
])->columns(3),
Fieldset::make('Power')
->relationship('state')
->schema([
Select::make('requested_power')->label('Power input request')
->reactive()
->afterStateUpdated(function (?Model $record, $state) {
/* @var Device $record */
$this->getMQTTBroker()->publish(new SetInputPowerMessage($record, $state));
})
->options([
'0' => 'Fixed 5V@5A',
'1' => 'Fixed 9V@5A',
'2' => 'Fixed 12V@5A',
'3' => 'Fixed 15V@5A',
'4' => 'Fixed 20V@5A',
]),
])->columns(3),