Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .bandit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
assert_used:
skips:
- src/nwp500/cli/rich_output.py
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,25 @@ jobs:
- name: Run tox lint
run: tox -e lint

security:
name: Security Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox

- name: Run bandit
run: tox -e bandit

test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .hypothesis/constants/05044b0e70ef42ab
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/unit_system.py
# hypothesis_version: 6.151.5

['Emmanuel Levijarvi', 'MIT', 'metric', 'unit_system', 'us_customary']
4 changes: 4 additions & 0 deletions .hypothesis/constants/13db13a7b2178134
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/utils.py
# hypothesis_version: 6.151.5

['Emmanuel Levijarvi', 'MIT']
4 changes: 4 additions & 0 deletions .hypothesis/constants/1b534f211836d036
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/enums.py
# hypothesis_version: 6.151.5

[257, 326, 407, 445, 480, 481, 513, 515, 517, 593, 594, 595, 596, 598, 615, 781, 798, 799, 901, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 920, 940, 990, 16777217, 16777219, 16777222, 16777225, 16777226, 33554433, 33554434, 33554437, 33554438, 33554439, 33554440, 33554441, 33554442, 33554443, 33554444, 33554445, 33554446, 33554447, 33554451, 33554455, 33554464, 33554466, 33554467, 33554468, 33554469, 33554470, 33554471, 33554472, 33554473, 33554474, 33554475, 33554476, '0.5°C', '1°C', '3 Stage', '50 gallons', '65 gallons', '80 gallons', 'Abnormal DIP Switch', 'Abnormal EEPROM', 'Abnormal Feedback', 'Abnormal Panel Key', 'Abnormal Power Meter', 'Advance Load Up', 'Always', 'Button', 'C', 'Commercial', 'Customer Peak Event', 'Dry Fire', 'Electric', 'Energy Saver', 'Heat Element', 'Heat Pump', 'Heat Pump Active', 'High Demand', 'Hybrid Boost', 'Hybrid Efficiency', 'Load Up', 'Mid Peak', 'No Error', 'Normal Operation', 'Not Applied', 'OFF', 'Off Peak', 'On Peak', 'Power Off', 'R', 'Relay Fault', 'Replacement Needed', 'Residential', 'Run Normal', 'Schedule', 'Shed', 'Standby', 'Temperature', 'Unknown', 'Vacation', 'Water Leak Detected']
4 changes: 4 additions & 0 deletions .hypothesis/constants/22cdb7ce598358e5
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt/diagnostics.py
# hypothesis_version: 6.151.5

[0.0, 1000, '-', '1', '11+', '2-5', '6-10', '=', 'Emmanuel Levijarvi', 'MIT', 'aws_error_counts', 'code', 'connected', 'inf', 'metrics', 'name', 'recent_connections', 'recent_drops', 'sample_durations', 'timestamp', 'total_sessions']
4 changes: 4 additions & 0 deletions .hypothesis/constants/30373286342e9c2d
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt_events.py
# hypothesis_version: 6.151.5

['CurrentOperationMode', 'DeviceFeature', 'DeviceStatus', 'ErrorCode', '_', 'connection_resumed', 'error_cleared', 'error_detected', 'feature_received', 'heating_started', 'heating_stopped', 'mode_changed', 'power_changed', 'status_received', 'temperature_changed']
4 changes: 4 additions & 0 deletions .hypothesis/constants/351307d9f52e5712
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt/client.py
# hypothesis_version: 6.151.5

[30.0, 300.0, 'Already connected', 'Emmanuel Levijarvi', 'MIT', 'Not connected', 'connected', 'connection failure', 'connection_resumed', 'name', 'resumed']
4 changes: 4 additions & 0 deletions .hypothesis/constants/38e5a0ee4c20c2fa
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/encoding.py
# hypothesis_version: 6.151.5

[150, 'Friday', 'Monday', 'Saturday', 'Sunday', 'Thursday', 'Tuesday', 'Wednesday', 'day_index', 'decimalPoint', 'decimal_point', 'enable', 'enabled', 'endHour', 'endMinute', 'end_hour', 'end_minute', 'hour', 'min', 'minute', 'mode', 'mode_id', 'month', 'param', 'priceMax', 'priceMin', 'season', 'startHour', 'startMinute', 'start_hour', 'start_minute', 'temperature', 'week', 'weekday']
4 changes: 4 additions & 0 deletions .hypothesis/constants/3cd888b2fda940ce
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt/reconnection.py
# hypothesis_version: 6.151.5

['Emmanuel Levijarvi', 'MIT', 'deep', 'quick', 'reconnection_failed']
4 changes: 4 additions & 0 deletions .hypothesis/constants/3e41f6e2dac7d711
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/converters.py
# hypothesis_version: 6.151.5

[0.0, 0.264172, 10.0, 'Celsius', 'Fahrenheit', 'div_10', 'enum_validator', 'metric', 'mul_10', 'str_enum_validator', 'temp_formula_type', 'temperatureType', 'temperature_type', 'volume_to_preferred']
4 changes: 4 additions & 0 deletions .hypothesis/constants/43960b0ace50254c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/venv/bin/pytest
# hypothesis_version: 6.151.5

['__main__']
4 changes: 4 additions & 0 deletions .hypothesis/constants/47db797441adc9da
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/topic_builder.py
# hypothesis_version: 6.151.5

['ctrl']
4 changes: 4 additions & 0 deletions .hypothesis/constants/523206edf9bd1235
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt/periodic.py
# hypothesis_version: 6.151.5

[300.0, 'DEVICE_ID_REDACTED', 'Emmanuel Levijarvi', 'name', 's']
4 changes: 4 additions & 0 deletions .hypothesis/constants/67b0a8ccf18bf5d2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /usr/lib/python3.13/sitecustomize.py
# hypothesis_version: 6.151.5

[]
4 changes: 4 additions & 0 deletions .hypothesis/constants/74e6edbaadef1e50
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/events.py
# hypothesis_version: 6.151.5

['Emmanuel Levijarvi', 'MIT']
4 changes: 4 additions & 0 deletions .hypothesis/constants/767fac7418bf21ee
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/device_info_cache.py
# hypothesis_version: 6.151.5

['Device info cached', 'DeviceFeature', 'DeviceFeature | None', 'Emmanuel Levijarvi', 'cached_at', 'device_count', 'devices', 'expires_at', 'is_expired', 'mac']
4 changes: 4 additions & 0 deletions .hypothesis/constants/7b14ae8dd875b280
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/temperature.py
# hypothesis_version: 6.151.5

[2.0, 10.0]
4 changes: 4 additions & 0 deletions .hypothesis/constants/7d39af6d962efa3c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt/command_queue.py
# hypothesis_version: 6.151.5

['Emmanuel Levijarvi', 'MIT']
4 changes: 4 additions & 0 deletions .hypothesis/constants/89a580be14782398
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/auth.py
# hypothesis_version: 6.151.5

[200, 401, 3600, '/', 'AuthTokens', 'Content-Type', 'Emmanuel Levijarvi', 'MIT', 'NavienAuthClient', 'SUCCESS', 'Token expires in: %s', 'User-Agent', 'UserInfo', 'accessKeyId', 'accessToken', 'access_key_id', 'access_token', 'application/json', 'authenticate', 'authorization', 'before', 'code', 'data', 'idToken', 'id_token', 'ignore', 'invalid', 'json', 'legal', 'metric', 'msg', 'password', 'refreshToken', 'refresh_access_token', 'refresh_token', 'secretKey', 'secret_key', 'sessionToken', 'session_token', 'token', 'tokens', 'unauthorized', 'us_customary', 'userId', 'userInfo']
4 changes: 4 additions & 0 deletions .hypothesis/constants/8f1254dc32667f86
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt/control.py
# hypothesis_version: 6.151.5

[5.0, 365, '+00:00', 'Emmanuel Levijarvi', 'MqttDeviceInfoCache', 'Z', 'additionalValue', 'air-filter-reset', 'anti-leg-off', 'anti-leg-on', 'app-connection', 'clientID', 'command', 'ctrl', 'ctrl/rsv/rd', 'ctrl/tou/rd', 'days', 'deviceType', 'device_info', 'dhw-mode', 'dhw-temperature', 'dhw_use', 'dr-off', 'dr-on', 'goout-day', 'holiday_use', 'macAddress', 'mode', 'period_days', 'periods', 'power-off', 'power-on', 'power_use', 'protocolVersion', 'recirc-hotbtn', 'recirc-mode', 'recirculation_use', 'request', 'requestTopic', 'reservation-mode', 'responseTopic', 'rsv/rd', 'sessionID', 'st', 'st/did', 'st/rsv/rd', 'temperature', 'timestamp', 'tou-off', 'tou-on', 'tou/rd', 'vacation_days']
4 changes: 4 additions & 0 deletions .hypothesis/constants/9e0fd89dbf206808
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt/__init__.py
# hypothesis_version: 6.151.5

['ConnectionDropEvent', 'ConnectionEvent', 'MqttConnectionConfig', 'MqttMetrics', 'NavienMqttClient', 'PeriodicRequestType']
4 changes: 4 additions & 0 deletions .hypothesis/constants/9eab8fc57863e41e
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt/subscriptions.py
# hypothesis_version: 6.151.5

['#', 'Emmanuel Levijarvi', 'Heating started', 'Heating stopped', 'error_cleared', 'error_detected', 'feature', 'feature_received', 'heating_started', 'heating_stopped', 'metric', 'mode_changed', 'power_changed', 'response', 'status', 'status_received', 'temperature_changed', 'utf-8', '°C', '°F']
4 changes: 4 additions & 0 deletions .hypothesis/constants/a3f229c898281d19
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt/utils.py
# hypothesis_version: 6.151.5

[1.0, 2.0, 120.0, 100, 256, 512, 1200, '#', '([0-9A-Fa-f]{12})', '+', '...<redacted>...', '/', '<REDACTED>', '<UNREPRESENTABLE>', 'Emmanuel Levijarvi', 'MIT', 'REDACTED', '[0-9A-Fa-f]{8,}', '\\1REDACTED', '\\b[0-9a-fA-F]{12}\\b', 'access_key_id', 'auth', 'clientID', 'clientId', 'client_id', 'device_info', 'device_status', 'email', 'macAddress', 'mac_address', 'navilink-', 'password', 'pushToken', 'push_token', 'secret_access_key', 'secret_key', 'sessionID', 'sessionToken', 'session_token', 'token']
4 changes: 4 additions & 0 deletions .hypothesis/constants/b00985cd3c10a1f8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/models.py
# hypothesis_version: 6.151.5

[0.0, 43.0, 65.0, 100.0, ' GPM', ' L', ' LPM', ' gal', ' °C', ' °F', '%', '...', 'Current fan RPM', 'Current state number', 'Fan PWM value', 'GPM', 'RPM', 'Target fan RPM', 'Unknown', 'Vacation day setting', 'W', 'Wh', 'before', 'clientID', 'days', 'device_class', 'device_info', 'energy', 'flow_rate', 'gal', 'h', 'heTime', 'heUsage', 'hours', 'hpTime', 'hpUsage', 'ignore', 'interval', 'json_schema_extra', 'metric', 'mixingValveUse', 'mode', 'power', 'python', 'sessionID', 'temperature', 'touInfo', 'unit_of_measurement', 'water', '°F']
4 changes: 4 additions & 0 deletions .hypothesis/constants/b294530e090203ba
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/.tox/default/bin/pytest
# hypothesis_version: 6.151.5

['.exe', '__main__']
4 changes: 4 additions & 0 deletions .hypothesis/constants/b5232deb51bddc9a
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/__init__.py
# hypothesis_version: 6.151.5

['APIError', 'AuthTokens', 'AuthenticationError', 'CommandCode', 'ConnectionDropEvent', 'ConnectionEvent', 'CurrentOperationMode', 'DREvent', 'Device', 'DeviceError', 'DeviceFeature', 'DeviceInfo', 'DeviceNotFoundError', 'DeviceOfflineError', 'DeviceOperationError', 'DeviceStatus', 'DhwOperationSetting', 'EnergyUsageDay', 'EnergyUsageResponse', 'EnergyUsageTotal', 'ErrorCode', 'EventEmitter', 'EventListener', 'FilterChange', 'FirmwareInfo', 'HeatSource', 'InstallType', 'Location', 'MonthlyEnergyData', 'MqttClientEvents', 'MqttCommand', 'MqttConnectionConfig', 'MqttConnectionError', 'MqttCredentialsError', 'MqttDeviceInfoCache', 'MqttError', 'MqttMetrics', 'MqttPublishError', 'MqttRequest', 'NavienAPIClient', 'NavienAuthClient', 'NavienMqttClient', 'Nwp500Error', 'OnOffFlag', 'Operation', 'PeriodicRequestType', 'RangeValidationError', 'RecirculationMode', 'TOUInfo', 'TOUSchedule', 'TempFormulaType', 'TemperatureType', 'TokenExpiredError', 'TokenRefreshError', 'TouRateType', 'TouWeekType', 'UnitType', 'UserInfo', 'ValidationError', 'VolumeCode', '__version__', 'authenticate', 'build_tou_period', 'decode_price', 'decode_week_bitfield', 'encode_price', 'encode_week_bitfield', 'get_unit_system', 'log_performance', 'nwp500-python', 'refresh_access_token', 'requires_capability', 'reset_unit_system', 'set_unit_system', 'unknown']
4 changes: 4 additions & 0 deletions .hypothesis/constants/bd643e9276a6173b
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/api_client.py
# hypothesis_version: 6.151.5

[200, 401, '/', '/device/info', '/device/list', '/device/tou', '1.0.0', '3.8+', 'Emmanuel Levijarvi', 'GET', 'MIT', 'NavienAPIClient', 'O', 'POST', 'Python', 'Python Client', '_session', 'additionalValue', 'appVersion', 'code', 'controllerId', 'count', 'data', 'firmwares', 'macAddress', 'metric', 'modelName', 'msg', 'offset', 'os', 'osVersion', 'pushToken', 'us_customary', 'userId', 'userType']
4 changes: 4 additions & 0 deletions .hypothesis/constants/c7a31c6dc0068cbd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/.venv/bin/pytest
# hypothesis_version: 6.151.5

['.exe', '__main__']
4 changes: 4 additions & 0 deletions .hypothesis/constants/ca0b70aa93535c1f
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/config.py
# hypothesis_version: 6.151.5

['/auth/refresh', '/user/sign-in', 'us-east-1']
4 changes: 4 additions & 0 deletions .hypothesis/constants/cd91fc95eade0457
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/mqtt/connection.py
# hypothesis_version: 6.151.5

['Already connected', 'Emmanuel Levijarvi', 'MIT', 'MqttConnectionConfig', 'NavienAuthClient', 'Not connected', 'name', 'utf-8']
4 changes: 4 additions & 0 deletions .hypothesis/constants/d0ea67d716f83a90
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/device_capabilities.py
# hypothesis_version: 6.151.5

[', ', 'DeviceFeature', 'Emmanuel Levijarvi', 'dhw_use', 'holiday_use', 'power_use', 'recirculation_use']
4 changes: 4 additions & 0 deletions .hypothesis/constants/dae78f4d97fdd43b
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/field_factory.py
# hypothesis_version: 6.151.5

['W', 'dBm', 'device_class', 'energy', 'energy_field', 'json_schema_extra', 'kWh', 'power', 'power_field', 'signal_strength', 'temperature', 'temperature_field', 'unit_of_measurement', '°F']
4 changes: 4 additions & 0 deletions .hypothesis/constants/dcfcf6e03af72a1c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/factory.py
# hypothesis_version: 6.151.5

[]
4 changes: 4 additions & 0 deletions .hypothesis/constants/dfc00db7cf73d63c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/exceptions.py
# hypothesis_version: 6.151.5

['(retriable)', 'Emmanuel Levijarvi', 'MIT', 'details', 'error_code', 'error_type', 'message', 'retriable']
4 changes: 4 additions & 0 deletions .hypothesis/constants/e4b0f73ee49546d6
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file: /home/emmanuel/Projects/nwp500-python/src/nwp500/command_decorators.py
# hypothesis_version: 6.151.5

['Emmanuel Levijarvi', 'F']
2 changes: 2 additions & 0 deletions .hypothesis/examples/04e6b3400353b141/b04e33f1dccbdab0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[#���s�^޷H��`��v2l������4��
�>4��������/�
2 changes: 2 additions & 0 deletions .hypothesis/examples/04e6b3400353b141/e2ebc17191359b9b
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[#���s�^޷H��`��v2l������4��
�>4��������/�.secondary
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ testing =
pytest
pytest-cov
pytest-asyncio
hypothesis

# Development tools
dev =
Expand Down
Loading