Skip to content

Commit

Permalink
add id to solar ww-circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Oct 1, 2021
1 parent 0b0b1d9 commit 4f24035
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/devices/solar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Solar::Solar(uint8_t device_type, uint8_t device_id, uint8_t product_id, const s
}

// device values...
register_device_value(TAG_NONE, &id_, DeviceValueType::UINT, nullptr, FL_(ID), DeviceValueUOM::NONE);
id_ = product_id;

// special case for a device_id with 0x2A where it's not actual a solar module
if (device_id == 0x2A) {
Expand All @@ -75,9 +77,6 @@ Solar::Solar(uint8_t device_type, uint8_t device_id, uint8_t product_id, const s
return;
}

register_device_value(TAG_NONE, &id_, DeviceValueType::UINT, nullptr, FL_(ID), DeviceValueUOM::NONE);
id_ = product_id;

register_device_value(TAG_NONE, &collectorTemp_, DeviceValueType::SHORT, FL_(div10), FL_(collectorTemp), DeviceValueUOM::DEGREES);
register_device_value(TAG_NONE, &tankBottomTemp_, DeviceValueType::SHORT, FL_(div10), FL_(tankBottomTemp), DeviceValueUOM::DEGREES);
register_device_value(TAG_NONE, &solarPump_, DeviceValueType::BOOL, nullptr, FL_(solarPump), DeviceValueUOM::NONE);
Expand Down

0 comments on commit 4f24035

Please sign in to comment.