275 if (this->last_qpiri_) {
276 this->last_qpiri_->publish_state(
message);
288 this->
read_int_sensor_(message, &pos, this->ac_output_rating_apparent_power_);
289 this->
read_int_sensor_(message, &pos, this->ac_output_rating_active_power_);
298 this->
read_int_sensor_(message, &pos, this->current_max_ac_charging_current_);
315 if (this->input_voltage_range_) {
316 this->input_voltage_range_->publish_state(input_voltage_range.
value_or(NAN));
319 if (this->input_voltage_range_switch_ && input_voltage_range.
has_value()) {
320 this->input_voltage_range_switch_->publish_state(input_voltage_range.
value() == 1);
323 if (this->output_source_priority_) {
324 this->output_source_priority_->publish_state(output_source_priority.
value_or(NAN));
327 if (this->output_source_priority_utility_switch_ && output_source_priority.
has_value()) {
328 this->output_source_priority_utility_switch_->publish_state(output_source_priority.
value() == 0);
330 if (this->output_source_priority_solar_switch_ && output_source_priority.
has_value()) {
331 this->output_source_priority_solar_switch_->publish_state(output_source_priority.
value() == 1);
333 if (this->output_source_priority_battery_switch_ && output_source_priority.
has_value()) {
334 this->output_source_priority_battery_switch_->publish_state(output_source_priority.
value() == 2);
336 if (this->output_source_priority_hybrid_switch_ && output_source_priority.
has_value()) {
337 this->output_source_priority_hybrid_switch_->publish_state(output_source_priority.
value() == 3);
340 if (this->pv_ok_condition_for_parallel_) {
341 this->pv_ok_condition_for_parallel_->publish_state(pv_ok_condition_for_parallel.
value_or(NAN));
344 if (this->pv_ok_condition_for_parallel_switch_ && pv_ok_condition_for_parallel.
has_value()) {
345 this->pv_ok_condition_for_parallel_switch_->publish_state(pv_ok_condition_for_parallel.
value() == 1);
348 if (this->pv_power_balance_) {
349 this->pv_power_balance_->publish_state(pv_power_balance.
value_or(NAN));
352 if (this->pv_power_balance_switch_ && pv_power_balance.
has_value()) {
353 this->pv_power_balance_switch_->publish_state(pv_power_balance.
value() == 1);
358 if (this->last_qpigs_) {
359 this->last_qpigs_->publish_state(
message);
379 this->
read_int_sensor_(message, &pos, this->inverter_heat_sink_temperature_);
387 std::string device_status_1 = this->
read_field_(message, &pos);
398 if (this->battery_voltage_offset_for_fans_on_) {
399 this->battery_voltage_offset_for_fans_on_->publish_state(battery_voltage_offset_for_fans_on.
value_or(NAN) / 10.0f);
404 std::string device_status_2 = this->
read_field_(message, &pos);
484 if (this->last_qpiws_) {
485 this->last_qpiws_->publish_state(
message);
493 bool value_warnings_present =
false;
494 bool value_faults_present =
false;
496 for (
size_t i = 0; i < 36; i++) {
497 if (i == 31 || i == 32) {
505 value_warnings_present |= enabled.
value_or(
false);
509 value_faults_present |= enabled.
value_or(
false);
513 value_faults_present |= enabled.
value_or(
false);
517 value_faults_present |= enabled.
value_or(
false);
521 value_faults_present |= enabled.
value_or(
false);
525 value_warnings_present |= enabled.
value_or(
false);
529 value_faults_present |= enabled.
value_or(
false);
533 value_faults_present |= enabled.
value_or(
false);
537 value_faults_present |= enabled.
value_or(
false);
541 value_warnings_present |= enabled.
value_or(
false);
545 value_warnings_present |= enabled.
value_or(
false);
549 value_warnings_present |= enabled.
value_or(
false);
553 value_warnings_present |= enabled.
value_or(
false);
557 value_warnings_present |= enabled.
value_or(
false);
561 value_warnings_present |= enabled.
value_or(
false);
565 value_warnings_present |= enabled.
value_or(
false);
569 value_warnings_present |= enabled.
value_or(
false);
573 value_faults_present |= enabled.
value_or(
false);
577 value_faults_present |= enabled.
value_or(
false);
581 value_faults_present |= enabled.
value_or(
false);
585 value_faults_present |= enabled.
value_or(
false);
589 value_faults_present |= enabled.
value_or(
false);
593 value_faults_present |= enabled.
value_or(
false);
597 value_faults_present |= enabled.
value_or(
false);
601 value_warnings_present |= enabled.
value_or(
false);
605 value_warnings_present |= enabled.
value_or(
false);
609 value_faults_present |= enabled.
value_or(
false);
613 value_warnings_present |= enabled.
value_or(
false);
617 value_warnings_present |= enabled.
value_or(
false);
621 value_faults_present |= enabled.
value_or(
false);
625 value_warnings_present |= enabled.
value_or(
false);
629 value_warnings_present |= enabled.
value_or(
false);
632 value_warnings_present |= enabled.
value_or(
false);
640 if (this->fault_code_) {
641 if (
flags.length() < 33) {
642 this->fault_code_->publish_state(NAN);
644 std::string fc(
flags, 31, 2);