Skip to content

Commit fcd8828

Browse files
hhiclaude
andcommitted
Add CLAUDE.md for Claude Code guidance
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ba97730 commit fcd8828

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

CLAUDE.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is a Homey (smart home platform) script collection for dynamic temperature setpoint calculation based on outdoor temperature. The system implements an algorithm by BerndGaykema that adjusts heating setpoints using outdoor temperature thresholds and heating curve corrections.
8+
9+
## Architecture
10+
11+
The system consists of two main JavaScript files designed to run as HomeyScript applications:
12+
13+
- **setup_stookwaarde-temp.js**: Initializes variables and processes outdoor temperature input from flow arguments. Sets up global variables for heating correction (-2°C default), base heating value (20°C), and current outdoor temperature.
14+
15+
- **bepaal_setpoint-temp.js**: Core calculation logic that determines new setpoint temperature using:
16+
- Temperature threshold mapping (15°C to -18°C range with corresponding heating values 23-30°C)
17+
- Heating correction factor applied to final setpoint
18+
- HomeyVars class for managing global variables and tags
19+
20+
## Key Components
21+
22+
### HomeyVars Class
23+
Utility class in `bepaal_setpoint-temp.js:3-13` that handles:
24+
- Getting/setting global variables with defaults
25+
- Tag management for Homey flow integration
26+
27+
### Temperature Mapping
28+
Array-based threshold system in `bepaal_setpoint-temp.js:22-35` that maps outdoor temperature ranges to heating values. The algorithm iterates through thresholds to find the appropriate heating value based on current outdoor temperature.
29+
30+
## Usage Context
31+
32+
These scripts are meant to be integrated into Homey Advanced Flows as "HomeyScript code" cards. The flow should be named "dynamische setpoint bepaling" and requires the heating curve setting to be OFF (Sluiting) on the heating system.
33+
34+
## Development Notes
35+
36+
- No package.json, build tools, or test frameworks present
37+
- Pure JavaScript without external dependencies
38+
- Uses Homey-specific global APIs (global.get/set, tag functions)
39+
- Dutch language comments and variable names
40+
- Temperature values are in Celsius

0 commit comments

Comments
 (0)