# bannon52/sourdough_bulk_fermenter architecture

> Architecture diagram of the GitHub repository bannon52/sourdough_bulk_fermenter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bannon52/sourdough_bulk_fermenter
- Repository: https://github.com/bannon52/sourdough_bulk_fermenter

## Overview

This Home Assistant integration configures temperature and optional humidity inputs, estimates bulk fermentation from a Q10 model and editable recipe, and exposes live sensors and timer controls. The runtime coordinator owns condition reads, recalculation, accumulated progress, and notifications; entity platforms publish and mutate that shared state. A bundled Lovelace card presents the outputs and controls. Edges are limited to calls and relationships shown in excerpts or documented in the README; unsampled sensor and configuration wiring is not inferred.

Main entry points: [`custom_components/sourdough_ferment/coordinator.py`](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/coordinator.py) (Shared runtime coordinator), [`custom_components/sourdough_ferment/www/sourdough-card.js`](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/www/sourdough-card.js) (Fermentation dashboard card), [`custom_components/sourdough_ferment/sensor.py`](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/sensor.py) (Countdown sensors), [`custom_components/sourdough_ferment/number.py`](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/number.py) (Recipe number controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and Configuration"]
  node_config["Setup and options flow<br/>[config_flow.py]"]
  node_entry["Integration setup<br/>[__init__.py]"]
  node_constants["Defaults and signals<br/>[const.py]"]
end

subgraph group_runtime["Fermentation Runtime"]
  node_coordinator["Shared runtime coordinator<br/>[coordinator.py]"]
  node_calc["Fermentation model<br/>[calc.py]"]
end

subgraph group_entities["Home Assistant Entities"]
  node_sensors["Estimate and recipe sensors<br/>[sensor.py]"]
  node_timer_sensors["Countdown sensors<br/>[sensor.py]"]
  node_recipe_controls["Recipe number controls<br/>[number.py]"]
  node_timer_buttons["Start and reset buttons<br/>[button.py]"]
end

subgraph group_frontend["Dashboard Card"]
  node_card["Fermentation dashboard card<br/>[sourdough-card.js]"]
end

node_user(("Home Assistant user"))
node_source_sensors(("Temperature and humidity sensors"))
node_notify(("Notify services"))

node_user -->|"configures integration"| node_config
node_entry -->|"creates coordinator"| node_coordinator
node_entry -->|"registers frontend"| node_card
node_coordinator -->|"reads conditions"| node_source_sensors
node_coordinator -->|"calculates estimate"| node_calc
node_sensors -->|"reads runtime state"| node_coordinator
node_timer_sensors -->|"reads countdown"| node_coordinator
node_recipe_controls -->|"updates recipe"| node_coordinator
node_timer_buttons -->|"starts or resets"| node_coordinator
node_coordinator -->|"sends alerts"| node_notify
node_user -->|"edits recipe"| node_recipe_controls
node_user -->|"controls timer"| node_timer_buttons
node_card -->|"sets recipe values"| node_recipe_controls
node_card -->|"fires timer controls"| node_timer_buttons
node_card -->|"displays estimates"| node_sensors
node_card -->|"displays progress"| node_timer_sensors
node_coordinator -->|"publishes countdown"| node_timer_sensors

click node_config "https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/config_flow.py"
click node_entry "https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/__init__.py"
click node_constants "https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/const.py"
click node_coordinator "https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/coordinator.py"
click node_calc "https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/calc.py"
click node_sensors "https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/sensor.py"
click node_timer_sensors "https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/sensor.py"
click node_recipe_controls "https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/number.py"
click node_timer_buttons "https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/button.py"
click node_card "https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/www/sourdough-card.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config,node_entry,node_constants,node_user toneBlue
class node_coordinator,node_calc toneAmber
class node_sensors,node_timer_sensors,node_recipe_controls,node_timer_buttons toneMint
class node_card toneRose
class node_source_sensors,node_notify toneIndigo
```

## Components

### Setup and Configuration

- [Setup and options flow](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/config_flow.py): `custom_components/sourdough_ferment/config_flow.py`
- [Integration setup](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/__init__.py): `custom_components/sourdough_ferment/__init__.py`
- [Defaults and signals](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/const.py): `custom_components/sourdough_ferment/const.py`

### Fermentation Runtime

- [Shared runtime coordinator](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/coordinator.py): `custom_components/sourdough_ferment/coordinator.py`
- [Fermentation model](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/calc.py): `custom_components/sourdough_ferment/calc.py`

### Home Assistant Entities

- [Estimate and recipe sensors](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/sensor.py): `custom_components/sourdough_ferment/sensor.py`
- [Countdown sensors](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/sensor.py): `custom_components/sourdough_ferment/sensor.py`
- [Recipe number controls](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/number.py): `custom_components/sourdough_ferment/number.py`
- [Start and reset buttons](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/button.py): `custom_components/sourdough_ferment/button.py`

### Dashboard Card

- [Fermentation dashboard card](https://github.com/bannon52/sourdough_bulk_fermenter/blob/main/custom_components/sourdough_ferment/www/sourdough-card.js): `custom_components/sourdough_ferment/www/sourdough-card.js`

### Other components

- **Home Assistant user**
- **Temperature and humidity sensors**
- **Notify services**

## Connections

- Home Assistant user → Setup and options flow: configures integration (evidence: `README.md`)
- Integration setup → Shared runtime coordinator: creates coordinator (evidence: `custom_components/sourdough_ferment/__init__.py`)
- Integration setup → Fermentation dashboard card: registers frontend (evidence: `custom_components/sourdough_ferment/__init__.py`)
- Shared runtime coordinator → Temperature and humidity sensors: reads conditions (evidence: `custom_components/sourdough_ferment/coordinator.py`)
- Shared runtime coordinator → Fermentation model: calculates estimate (evidence: `custom_components/sourdough_ferment/coordinator.py`)
- Estimate and recipe sensors → Shared runtime coordinator: reads runtime state (evidence: `custom_components/sourdough_ferment/sensor.py`)
- Countdown sensors → Shared runtime coordinator: reads countdown (evidence: `custom_components/sourdough_ferment/sensor.py`)
- Recipe number controls → Shared runtime coordinator: updates recipe (evidence: `custom_components/sourdough_ferment/number.py`)
- Start and reset buttons → Shared runtime coordinator: starts or resets (evidence: `custom_components/sourdough_ferment/button.py`)
- Shared runtime coordinator → Notify services: sends alerts (evidence: `custom_components/sourdough_ferment/coordinator.py`)
- Home Assistant user → Recipe number controls: edits recipe (evidence: `README.md`)
- Home Assistant user → Start and reset buttons: controls timer (evidence: `README.md`)
- Fermentation dashboard card → Recipe number controls: sets recipe values (evidence: `README.md`)
- Fermentation dashboard card → Start and reset buttons: fires timer controls (evidence: `README.md`)
- Fermentation dashboard card → Estimate and recipe sensors: displays estimates (evidence: `README.md`)
- Fermentation dashboard card → Countdown sensors: displays progress (evidence: `README.md`)
- Shared runtime coordinator → Countdown sensors: publishes countdown (evidence: `README.md`)
