Class: ESPHome::Cli::Entities::Switch
- Inherits:
-
Menu
- Object
- SimpleDelegator
- ESPHome::Cli::Entity
- Menu
- ESPHome::Cli::Entities::Switch
- Defined in:
- lib/esphome/cli/entities/switch.rb
Instance Attribute Summary
Attributes inherited from ESPHome::Cli::Entity
Instance Method Summary collapse
Methods inherited from Menu
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
#command(command) ⇒ Object
11 12 13 14 |
# File 'lib/esphome/cli/entities/switch.rb', line 11 def command(command) cli.info("Turning #{object_id_} #{command}") __send__(command.to_sym) end |
#options ⇒ Object
9 |
# File 'lib/esphome/cli/entities/switch.rb', line 9 def = %w[on off] |