Skip to content

Commit

Permalink
The target channel may also be a channel with the STAIRCASETIMER func…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
przemyslawzygmunt committed Feb 11, 2022
1 parent 3fc98e3 commit 7a3c69a
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -428,7 +428,8 @@ public function getMeasurementLogsAction(Request $request, IODeviceChannel $chan

private function findTargetChannel(IODeviceChannel $channel): IODeviceChannel {
$targetChannel = $channel;
if (in_array($channel->getFunction()->getId(), [ChannelFunction::POWERSWITCH, ChannelFunction::LIGHTSWITCH])) {
if (in_array($channel->getFunction()->getId(), [ChannelFunction::POWERSWITCH, ChannelFunction::LIGHTSWITCH,
ChannelFunction::STAIRCASETIMER])) {
$relatedMeasurementChannelId = $channel->getParam1();
if ($relatedMeasurementChannelId) {
$targetChannel = $this->channelRepository->findForUser($channel->getUser(), $relatedMeasurementChannelId);
Expand Down

0 comments on commit 7a3c69a

Please sign in to comment.