Class: ESPHome::Cli::Entities::Button

Inherits:
ESPHome::Cli::Entity show all
Defined in:
lib/esphome/cli/entities/button.rb

Instance Attribute Summary

Attributes inherited from ESPHome::Cli::Entity

#cli, #index

Instance Method Summary collapse

Methods inherited from ESPHome::Cli::Entity

#initialize, #move_left, #move_right, #print, #touch

Constructor Details

This class inherits a constructor from ESPHome::Cli::Entity

Instance Method Details

#activateObject



11
12
13
14
# File 'lib/esphome/cli/entities/button.rb', line 11

def activate
  cli.info("Pressing #{object_id_}")
  press
end

#formatted_stateObject



7
8
9
# File 'lib/esphome/cli/entities/button.rb', line 7

def formatted_state
  "PRESS"
end