1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 07:42:26 +01:00

Fix light partition (#584)

* Fix light partition

Fixes https://github.com/esphome/issues/issues/365

* Lint
This commit is contained in:
Otto Winter
2019-05-31 13:38:56 +02:00
committed by GitHub
parent 8be733efee
commit a72c3ea9d7
9 changed files with 44 additions and 9 deletions

View File

@@ -33,4 +33,5 @@ def to_code(config):
conf[CONF_TO] - conf[CONF_FROM] + 1))
var = cg.new_Pvariable(config[CONF_OUTPUT_ID], segments)
yield cg.register_component(var, config)
yield light.register_light(var, config)

View File

@@ -24,7 +24,7 @@ class AddressableSegment {
int32_t dst_offset_;
};
class PartitionLightOutput : public light::AddressableLight, public Component {
class PartitionLightOutput : public light::AddressableLight {
public:
explicit PartitionLightOutput(std::vector<AddressableSegment> segments) : segments_(segments) {
int32_t off = 0;