lit ? parent::getId() : $this->idInfo->getSecondId(); } public function readStateFromData(int $id, int $stateMeta) : void{ parent::readStateFromData($id, $stateMeta); $this->lit = $id !== $this->idInfo->getSecondId(); } public function isLit() : bool{ return $this->lit; } /** * @return $this */ public function setLit(bool $lit = true) : self{ $this->lit = $lit; return $this; } public function getLightLevel() : int{ return $this->lit ? 7 : 0; } }