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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user