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
parent 6535b0966e
commit d02e280c3c
9 changed files with 44 additions and 9 deletions
+1
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)
@@ -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;