{{ $device->name }}

@if (session('status'))
{{ session('status') }}
@endif @if (session('error'))
{{ session('error') }}
@endif

{{ __('Живое состояние (Redis device shadow)') }}

{{ __('Статус') }}
$shadow['status'] === 'online', 'bg-gray-100 text-gray-600' => $shadow['status'] === 'offline', 'bg-yellow-100 text-yellow-800' => $shadow['status'] === 'unknown', ])>{{ $shadow['status'] }}
{{ __('Последняя активность') }}
{{ $shadow['last_seen']?->diffForHumans() ?? __('нет данных') }}
{{ __('Желаемое состояние (desired)') }}
{{ json_encode($shadow['desired_state']) }}
{{ __('Подтверждённое состояние (reported)') }}
{{ json_encode($shadow['reported_state']) }}
@can('update', $device) @php $capabilities = $device->deviceType->capabilities ?? []; @endphp @if (!empty(array_intersect($capabilities, ['turn_on', 'turn_off', 'set_level'])))

{{ __('Ручное управление') }}

@if (in_array('turn_on', $capabilities))
@csrf {{ __('Включить') }}
@endif @if (in_array('turn_off', $capabilities))
@csrf {{ __('Выключить') }}
@endif @if (in_array('set_level', $capabilities))
@csrf {{ __('Установить уровень') }}
@endif
@endif @endcan @if ($device->deviceType->category->value === 'sensor')

{{ __('Последние показания (ClickHouse)') }}

@forelse ($telemetry as $row) @empty @endforelse
{{ __('Тип') }} {{ __('Значение') }} {{ __('Время') }}
{{ $row['sensor_type'] }} {{ $row['value'] }} {{ $row['recorded_at'] }}
{{ __('Показаний пока нет.') }}
@endif {{ __('← Назад к устройствам') }}