Class: ESPHome::Entities::Button

Inherits:
ESPHome::Entity show all
Includes:
HasDeviceClass
Defined in:
lib/esphome/entities/button.rb

Instance Attribute Summary

Attributes inherited from ESPHome::Entity

#device, #disabled_by_default, #entity_category, #icon, #key, #name, #object_id_

Instance Method Summary collapse

Methods inherited from ESPHome::Entity

#inspect

Instance Method Details

#pressObject



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

def press
  device.send(Api::ButtonCommandRequest.new(key:))
end