Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/epa2.0 line voltage #41

Merged
merged 47 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3623c26
Adding line-voltage thermostat equipment type
craigmaloney Aug 26, 2020
3c2492e
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Nov 3, 2020
33f7450
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Nov 4, 2020
ab09cd5
Adding none type for equipment type, fixing tests
craigmaloney Nov 4, 2020
ed39c25
Only run if any thermostats are kept
craigmaloney Nov 11, 2020
1899fe2
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Nov 19, 2020
a71c4cd
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Nov 25, 2020
082c24d
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Dec 9, 2020
0bd1892
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Dec 15, 2020
cb60996
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Dec 15, 2020
abd4a19
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Jan 25, 2021
9112397
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Feb 5, 2021
8450ad2
Adding updated test data
craigmaloney Feb 9, 2021
5a5ec54
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Feb 9, 2021
f2d6544
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Feb 24, 2021
c65f0aa
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Feb 26, 2021
dda7674
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Mar 11, 2021
f8c87e1
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Apr 7, 2021
737902e
Updating tutorial
craigmaloney Apr 20, 2021
bf1954c
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Apr 20, 2021
c634c0e
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney May 5, 2021
953b03f
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney May 10, 2021
8da3b05
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney May 25, 2021
1ecf6e9
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Jul 14, 2021
0277945
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Jul 14, 2021
8bc0428
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Aug 30, 2021
6843363
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Sep 2, 2021
a1a25d2
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Sep 10, 2021
e26d26f
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Sep 30, 2021
cf3805f
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Jan 12, 2022
9cd5152
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Jan 31, 2022
b7354be
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Feb 3, 2022
1b476eb
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Mar 11, 2022
a6e0d4c
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Mar 18, 2022
8f18167
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Jul 21, 2022
c5790bc
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Aug 17, 2022
3ceee4c
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Nov 28, 2022
0b59965
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Jan 18, 2023
20fbd7c
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Mar 14, 2023
0e3abb2
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Mar 14, 2023
20f6218
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Mar 14, 2023
0af45fa
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Mar 14, 2023
9e3b984
Merge branch 'feature/epathermostat_2.0' into feature/epa2.0_line_vol…
craigmaloney Mar 15, 2023
7f8682e
testing CI
john-zither Nov 24, 2023
3f36423
updated testing enviorment
john-zither Dec 11, 2023
5ce9a80
Merge pull request #42 from EPAENERGYSTAR/feature/epa2.0_line_voltage…
john-zither Dec 11, 2023
1d9638f
removed wasted comment
john-zither Dec 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
# Apparently 3.10 gets converted to 3.1 if it's not a string. Brilliant.
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
python-version: [3.8, 3.9, '3.10', '3.11']

steps:
- uses: actions/checkout@v3
Expand All @@ -22,7 +22,7 @@ jobs:
python -m pip install --upgrade pip
pip install wheel flake8
pip install -r dev-requirements.txt
pip install -e .
pip install -r requirements.txt
- name: Prime Cache
run: |
mkdir $HOME/.eeweather
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_conda_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ jobs:
C:\Miniconda\condabin\conda.bat activate base
C:\Miniconda\condabin\conda.bat install pytest pytest-cov coverage mock pip
C:\Miniconda\condabin\conda.bat install -c conda-forge shapely
pip install -e .
pip install -r requirements.txt
pytest

7 changes: 7 additions & 0 deletions tests/test_equipment_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
validate_heat_stage,
validate_cool_stage,
first_stage_capacity_ratio,
is_line_voltage,
)


Expand Down Expand Up @@ -41,6 +42,7 @@ def test_has_heating():
'furnace_or_boiler', # Non heat pump heating (gas or oil furnace, electric resistance)
'heat_pump_electric_backup', # Heat pump with electric resistance heat (strip heat)
'heat_pump_no_electric_backup', # Heat pump without electric resistance heat
'electric_resistance', # Electric Resistance (Line-voltage thermostat)
]:
assert(has_heating(i) is True)
for i in [
Expand Down Expand Up @@ -112,6 +114,11 @@ def test_has_resistance_heat():
assert(has_resistance_heat('heat_pump_dual_fuel') is False)


def test_is_line_voltage():
assert(is_line_voltage('electric_resistance') is True)
assert(is_line_voltage('heat_pump_dual_fuel') is False)


def test_ratio():
assert(first_stage_capacity_ratio('furnace_or_boiler') == .65)
assert(first_stage_capacity_ratio('heat_pump') == .72)
21 changes: 21 additions & 0 deletions thermostat/equipment_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
'heat_pump_electric_backup', # Heat pump with electric resistance heat (strip heat)
'heat_pump_no_electric_backup', # Heat pump without electric resistance heat
'heat_pump_dual_fuel', # Dual fuel heat pump (e.g. gas or oil fired)
'electric_resistance', # Line voltage thermostat electric resistance heat
'other', # Multi-zone, ?
'none', # No central heating system
]
Expand All @@ -17,6 +18,7 @@
'two_speed', # Dual capacity heater or dual stage compressor (synonym)
'modulating', # Modulating or variable capacity unit
'variable_speed', # Modulating or variable capacity unit
'none', # No central heating system
]

COOL_TYPE = [
Expand All @@ -33,6 +35,7 @@
'two_stage', # Dual stage compressor (synonym)
'modulating', # Modulating or variable capacity compressor
'variable_speed', # Modulating or variable capacity unit
'none', # No central cooling system
]

#: This mapping is for old scripts that need to refer to the old mapping, but want to use the new functionality.
Expand Down Expand Up @@ -238,6 +241,24 @@ def has_resistance_heat(heat_type):
return False


def is_line_voltage(heat_type):
""" Determines if the heat type is valid for line-voltage thermostats

Parameters
----------
heat_type : str
The name of the heating type


Returns
-------
boolean
"""
if heat_type == 'electric_resistance':
return True
return False


def validate_heat_type(heat_type):
if heat_type is None or heat_type == '' or heat_type in HEAT_TYPE:
return True
Expand Down
7 changes: 7 additions & 0 deletions thermostat/importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
has_two_stage_heating,
has_multi_stage_cooling,
has_multi_stage_heating,
is_line_voltage,
first_stage_capacity_ratio,
)

Expand Down Expand Up @@ -384,6 +385,12 @@ def get_single_thermostat(thermostat_id, zipcode,
temp_out = get_indexed_temperatures_eeweather(station, hourly_index_utc - utc_offset)
temp_out.index = hourly_index

# Validate line-voltage heat-type doesn't have cooling
if is_line_voltage(heat_type) and has_cooling(cool_type):
message = ("Line-voltage thermostat thermostat_id={} has cooling type set. "
"This thermostat-type doesn't support cooling.".format(thermostat_id))
raise RuntimeError(message)

# load daily time series values
auxiliary_heat_runtime, emergency_heat_runtime = _calculate_aux_emerg_runtime(df, thermostat_id, heat_type, heat_stage, hourly_index)
cool_runtime = _calculate_cool_runtime(df, thermostat_id, cool_type, cool_stage, hourly_index)
Expand Down
Loading