Skip to content

Control your heat-pump/aircondition and screens to maintain a optimal indoor temperature based on outdoor and indoor temperature sensors

License

Notifications You must be signed in to change notification settings

Pythm/ad-ClimateCommander

Repository files navigation

Climate Commander 🌡️

An intelligent climate control app for Home Assistant built with AppDaemon.
Automate HVAC systems, manage cover controls, and maintain optimal indoor temperatures using environmental data from sensors.


🚨 Breaking Changes

1.1.0

  • Unified control naming: Climate entities are now configured as either "HVAC" or "Heater" for clarity.
  • Renamed indoor_sensor_temp (previously indoor_temp).
  • Renamed "vacation mode" (away state) to vacation to distinguish from daily away states.

1.2.0

  • Notification Enhancements: Notifications now send recipients as a list (single API call). Custom notification apps may need updates.
  • Weather Sensor Configuration: Automatic weather sensor detection removed. Use the ad‑Weather app or a custom event‑based solution.

1.2.3

  • MQTT Default Namespace: Updated to 'mqtt' as this is the default in AppDaemon documentation.

1.2.4

  • Spelling Correction: Changed notify_recievernotify_receiver.

🔍 Features

  • HVAC Mode Switching

    • Switches to fan_only if the indoor temperature is 0.6 °C above target or windows are open.
    • Switches to cool if the indoor temperature is 2 °C above target and the outdoor temperature exceeds the indoor target.
    • Switches to heat if the indoor temperature is at or below target.
  • Screen/Cover Automation

    • Automatically closes screens/curtains when the indoor temperature exceeds the target and ambient light (lux) levels are above thresholds.
    • Supports wind, rain, and lux sensors for dynamic control.
  • Vacation Mode

    • Lowers the indoor temperature to vacation_temp when activated via an input_boolean.
  • Daytime Savings / Increasing

    • Adjusts the target temperature during specific time windows, optionally based on presence detection.
  • Silent Periods

    • Sets the fan speed to silence during defined intervals.

AI‑Generated Screenshot


📦 Installation & Configuration

1. Clone the repository

git clone https://github.com/Pythm/ad-ClimateCommander.git /path/to/appdaemon/apps/

2. Configure the app in your AppDaemon .yaml or .toml file:

nameyourClimateCommander:
  module: climateCommander
  class: Climate
  HVAC:
    - climate: climate.yourClimate
      indoor_sensor_temp: sensor.yourIndoorTemperatureSensor
      target_indoor_temp: 22.7

💡 Tip: Default values are used if parameters are omitted from the configuration.


📌 Notes

  • Weather Data: Use the ad‑Weather app for optimal integration. It consolidates all your weather sensors into a single app and publishes events for other apps to consume.

    ⚠️ Important: If you configure weather sensors directly in ClimateCommander, they will take precedence over the ad‑Weather app.

  • Indoor Sensor: Required for proper operation. Ensure it is placed correctly and the target temperature is set appropriately.


📚 Key Definitions

App‑Level Configuration

Key Type Default Description
HASS_namespace string "default" Home Assistant namespace (optional).
MQTT_namespace string "mqtt" MQTT namespace (optional).
outside_temperature sensor (required) Sensor for outdoor temperature.
anemometer sensor (optional) Wind‑speed sensor.
anemometer_speed int 40 Wind‑speed threshold to trigger screen opening/boost mode.
rain_sensor sensor (optional) Rain‑detection sensor.
rain_level int 3 Rain‑intensity threshold to trigger screen opening.
OutLuxMQTT MQTT sensor (optional) Primary outdoor lux sensor via MQTT.
OutLux_sensor sensor (optional) Primary outdoor lux sensor.
OutLuxMQTT_2 MQTT sensor (optional) Secondary outdoor lux sensor via MQTT.
OutLux_sensor_2 sensor (optional) Secondary outdoor lux sensor (non‑MQTT).
screening_temp int 8 Minimum outdoor temperature to close screens/covers.
getting_cold int 18 Threshold to trigger “cold outside” notifications.
json_path string None Persistent storage path for JSON data.
vacation input_boolean input_boolean.vacation Enable vacation mode.
vacation_temp int 16 Indoor temperature during vacation.

Climate Entity Configuration

Key Type Default Description
HVAC list (required) List of HVAC entities to control.
Heaters list (required) List of heater entities to control.
indoor_sensor_temp sensor (required) External indoor temperature sensor.
target_indoor_temp float 23 Desired indoor temperature.
target_indoor_input input_number (optional) Use a Home Assistant input number to set the target temperature dynamically.
window_sensor_temp sensor (optional) Window‑temperature sensor for adjusting the target temperature based on sunlight.
window_offset int -3 Offset between the window and indoor sensors for accuracy.
daytime_savings dict (optional) Adjust temperature during specified hours (e.g., lower temperature during the day).
silence dict (optional) Set fan to silence during defined intervals.
windowsensors list (optional) List of window/door sensors that turns down heating.

Screen/Cover Automation

Key Type Default Description
screening dict (optional) Configures cover entities for automatic opening/closing.
lux_close int 40000 Lux threshold to close covers.
lux_open int 15000 Lux threshold to open covers.
lux_open_media int 4000 Lux threshold to open covers when media is active.
not_when_home list (optional) Prevent covers from closing if specified users are home.
mediaplayers list (optional) List of media/switch entities to use an alternative lux‑open value.

🧩 Example Configuration

nameyourClimateCommander:
  module: climateCommander
  class: Climate
  json_path: /conf/persistent/Climate/
  vacation: input_boolean.vacation

  vacation_temp: 16
  screening_temp: 8
  getting_cold: 18
  rain_level: 3
  anemometer_speed: 40

  HVAC:
    - climate: climate.yourClimate
      indoor_sensor_temp: sensor.yourIndoorTemperatureSensor
      target_indoor_temp: 22.7
      automate: input_boolean. #Stops all automation of heating when off
      daytime_savings:
        - start: '10:00:00'
          stop: '14:00:00'
          presence:
            - person.wife
            - person.myself
      silence:
        - start: '21:00:00'
          stop: '07:00:00'
          presence:
            - person.myself
      screening:
        - screen: cover.your_screen
          lux_close: 40000
          lux_open: 15000
          lux_open_media: 4000
          not_when_home:
            - person.wife
          mediaplayers:
            - switch.projector
            - media_player.your_tv
      windowsensors:
        - binary_sensor.your_window_door_is_open

📌 Tips & Best Practices

  • Use input_boolean to toggle automation on/off with automate.
  • For lux sensors, use two sensors with names ending in '_2' for redundancy.
  • Wind/Rain Sensors: Automatically increase the indoor temperature by 0.3 °C when detected.
  • Persistent Storage: Store the average set temperature and fan mode for smoother restarts.

📢 Notifications

  • Configure notify_receiver with a list of devices (e.g., mobile_app_your_phone).
  • Use a custom notification app with the send_notification method.

🌤️ Weather Sensor Integration

We strongly recommend using the ad‑Weather app for weather data:

  • It consolidates all your weather sensors into a single app.
  • It publishes events that other apps (like ClimateCommander) can use.
  • If you configure weather sensors directly in ClimateCommander, they take precedence over ad‑Weather.

Wind & Rain Sensors in ClimateCommander

  • Define your wind‑speed sensor with anemometer and a threshold with anemometer_speed.
    • If wind exceeds the threshold, screens open and HVAC may activate boost mode.
  • Define your rain sensor with rain_sensor and a threshold with rain_level.
    • If rain is detected, screens open.
  • Wind or rain, separately or combined, increase the indoor temperature by 0.3 °C.

📌 License

MIT License


📈 Roadmap


🙋 Contributing

  • Found a bug? Open an issue or submit a PR!
  • Want to add a feature? Discuss in the GitHub Discussions.

Climate Commander by Pythm
GitHub

About

Control your heat-pump/aircondition and screens to maintain a optimal indoor temperature based on outdoor and indoor temperature sensors

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages