@foreach ($device->entities as $entity)
@php $isInput = \Illuminate\Support\Str::startsWith($entity->key, 'input:'); $idx = explode(':', $entity->key)[1] ?? '0'; $role = data_get($device->config, "input_roles.$idx"); @endphp
{{ $entity->name ?? $entity->key }}
{{ $entity->type }}
@if (in_array($entity->type, ['switch', 'light']))
@endif
@if ($isInput)
{{-- Promote a Shelly input to a window/door contact (invert-aware) --}}
{{ __('devices.role_label') }}
@if ($role)
@endif
@endif
@endforeach
@endif