Pete Stothers
Published © GPL3+

Hack a Breville Espresso Machine for Home Assistant Control

A quick guide on how to add a Shelly 1 WiFi relay inside a Breville BES870 espresso machine to mimic the on/off switch.

IntermediateFull instructions provided2 hours997
Hack a Breville Espresso Machine for Home Assistant Control

Things used in this project

Hardware components

Shelly1 WiFi Relay
×1

Software apps and online services

Home Assistant
Home Assistant

Story

Read more

Code

Home Assistant Coffee Machine Package

YAML
The three elements required for the code to work. A MQTT switch, an input_boolean and a template switch.
input_boolean:
  monitor_coffee:

switch:
  - platform: template
    switches:
      coffee_machine:
        friendly_name: Espresso Machine
        value_template: "{{ states('input_boolean.monitor_coffee') }}" 
        turn_on: &toggle_coffee
          - service: switch.turn_on
            entity_id: switch.coffee_machine_shelly_relay
          - service: input_boolean.toggle
            entity_id: input_boolean.monitor_coffee
          - delay:
              milliseconds: 400
          - service: switch.turn_off
            entity_id: switch.coffee_machine_shelly_relay
        turn_off: *toggle_coffee

  - platform: mqtt
    name: "Coffee Machine Shelly Relay"
    state_topic: "shellies/shelly1-<deviceID>/relay/0"
    command_topic: "shellies/shelly1-<deviceID>/relay/0/command"
    availability_topic: shellies/shelly1-<deviceID>/online
    payload_available: "true"
    payload_not_available: "false"
    qos: 2
    payload_on: "on"
    payload_off: "off"
    retain: false
    optimistic: false

Credits

Pete Stothers

Pete Stothers

1 project • 0 followers

Comments