supla-device
Loading...
Searching...
No Matches
binary_sensor_channel.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_CHANNELS_BINARY_SENSOR_CHANNEL_H_
5#define SRC_SUPLA_CHANNELS_BINARY_SENSOR_CHANNEL_H_
6
7#include "channel.h"
8
9namespace Supla {
11 public:
12 bool getValueBool() override;
13 void setServerInvertLogic(bool invert);
14 bool isServerInvertLogic() const;
15
16 protected:
17 // serverInvertLogic does not affect state reported to Supla server. However
18 // it may be used internally by device in order to respect server settings.
19 // Also external integrations (i.e. MQTT) use it to report inverted logic.
20 // getValueBool returns value with serverInvertLogic applied.
21 bool serverInvertLogic = false;
22};
23
24} // namespace Supla
25
26#endif // SRC_SUPLA_CHANNELS_BINARY_SENSOR_CHANNEL_H_
Definition binary_sensor_channel.h:10
Definition channel.h:26