Skip to content

Commit

Permalink
Channel impr. / dont accept commands during sync
Browse files Browse the repository at this point in the history
  • Loading branch information
DrRSatzteil committed Sep 23, 2023
1 parent db4d4c2 commit 4cc3f08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ public AwtrixLightAppHandler(Thing thing) {
public void handleCommand(ChannelUID channelUID, Command command) {
logger.trace("Received command {} of type {} on channel {}", command.toString(), command.getClass(),
channelUID.getAsString());
if (this.synchronizationRequired) {
// Don't accept any commands while we're synchronizing our settings
return;
}

if (command instanceof RefreshType) {
updateApp();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<tag>Measurement</tag>
<tag>Light</tag>
</tags>
<state readOnly="true" pattern="%.0f %unit%"></state>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>

<channel-type id="brightness">
Expand Down Expand Up @@ -468,7 +468,7 @@
<tags>
<tag>Control</tag>
</tags>
<state min="0" max="100"/>
<state min="0" max="100" pattern="%.0f %unit%"/>
</channel-type>

<channel-type id="progressColor">
Expand Down Expand Up @@ -500,6 +500,7 @@
<tags>
<tag>Control</tag>
</tags>
<state pattern="%.0f %unit%"></state>
</channel-type>

</thing:thing-descriptions>

0 comments on commit 4cc3f08

Please sign in to comment.