Skip to content

Commit

Permalink
Merge branch 'release/0.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
ledermann committed Sep 3, 2023
2 parents 11290be + f4173a1 commit ed37fce
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
16 changes: 9 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.1.1)
crack (0.4.5)
rexml
diff-lcs (1.5.0)
Expand All @@ -21,7 +22,7 @@ GEM
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.5)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand All @@ -35,15 +36,16 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (1.54.2)
rubocop (1.56.2)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
Expand All @@ -54,14 +56,14 @@ GEM
rubocop (~> 1.33)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.22.0)
rubocop-rspec (2.23.2)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
unicode-display_width (2.4.2)
vcr (6.2.0)
webmock (3.18.1)
webmock (3.19.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand All @@ -81,4 +83,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
2.4.17
2.4.19
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The following environment variables can be used to configure the importer:
| `INFLUX_TOKEN_WRITE` or `INFLUX_TOKEN` | Token for InfluxDB (requires write permissions) | |
| `INFLUX_ORG` | Organization for InfluxDB | |
| `INFLUX_BUCKET` | Bucket for InfluxDB | |
| `INFLUX_MEASUREMENT_PV` | Measurement for InfluxDB | |
| `INFLUX_MEASUREMENT_PV` | Measurement for InfluxDB | `SENEC` |
| `INFLUX_OPEN_TIMEOUT` | Timeout for InfluxDB connection (in seconds) | `30` |
| `INFLUX_READ_TIMEOUT` | Timeout for InfluxDB read (in seconds) | `30` |
| `INFLUX_WRITE_TIMEOUT` | Timeout for InfluxDB write (in seconds) | `30` |
Expand Down
2 changes: 1 addition & 1 deletion app/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.from_env(options = {})
ENV.fetch('INFLUX_TOKEN_WRITE', nil) || ENV.fetch('INFLUX_TOKEN'),
influx_org: ENV.fetch('INFLUX_ORG'),
influx_bucket: ENV.fetch('INFLUX_BUCKET'),
influx_measurement: ENV.fetch('INFLUX_MEASUREMENT_PV'),
influx_measurement: ENV.fetch('INFLUX_MEASUREMENT_PV', 'SENEC'),
influx_open_timeout: ENV.fetch('INFLUX_OPEN_TIMEOUT', 30).to_i,
influx_read_timeout: ENV.fetch('INFLUX_READ_TIMEOUT', 30).to_i,
influx_write_timeout: ENV.fetch('INFLUX_WRITE_TIMEOUT', 30).to_i,
Expand Down
12 changes: 6 additions & 6 deletions app/senec_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ def estimated_wallbox_charge_power
end

# KiloWatt
def parse_kw(row, *columns)
(cell(row, *columns).sub(',', '.').to_f * 1_000).round
def parse_kw(row, *)
(cell(row, *).sub(',', '.').to_f * 1_000).round
end

# Ampere
def parse_a(row, *columns)
cell(row, *columns).sub(',', '.').to_f
def parse_a(row, *)
cell(row, *).sub(',', '.').to_f
end

# Volt
def parse_v(row, *columns)
cell(row, *columns).sub(',', '.').to_f
def parse_v(row, *)
cell(row, *).sub(',', '.').to_f
end
end
4 changes: 2 additions & 2 deletions app/sungrow_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def grid_power
end

# KiloWatt
def parse_kw(row, *columns)
cell(row, *columns).to_f.round
def parse_kw(row, *)
cell(row, *).to_f.round
end
end

0 comments on commit ed37fce

Please sign in to comment.