public function getRelatedIds()
 {
     $attachments = AttachmentIndex::find()->where(['entity' => $this->getEntityClass(), 'entity_id' => $this->getEntityId(), 'attribute' => $this->attribute])->all();
     return \hass\base\helpers\ArrayHelper::getColumn($attachments, 'attachment_id');
 }