Class: ESPHome::Entity
- Inherits:
-
Object
- Object
- ESPHome::Entity
- Defined in:
- lib/esphome/entity.rb
Direct Known Subclasses
ESPHome::Entities::BinarySensor, ESPHome::Entities::Button, ESPHome::Entities::Climate, ESPHome::Entities::Cover, ESPHome::Entities::Date, ESPHome::Entities::DateTime, ESPHome::Entities::Fan, ESPHome::Entities::Light, ESPHome::Entities::Lock, ESPHome::Entities::Number, ESPHome::Entities::Select, ESPHome::Entities::Sensor, ESPHome::Entities::Switch, ESPHome::Entities::Text, ESPHome::Entities::TextSensor, ESPHome::Entities::Time
Defined Under Namespace
Modules: HasAssumedState, HasDeviceClass, HasState
Instance Attribute Summary collapse
-
#device ⇒ Object
readonly
Returns the value of attribute device.
-
#disabled_by_default ⇒ Object
readonly
Returns the value of attribute disabled_by_default.
-
#entity_category ⇒ Object
readonly
Returns the value of attribute entity_category.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#object_id_ ⇒ Object
readonly
Returns the value of attribute object_id_.
Instance Method Summary collapse
Instance Attribute Details
#device ⇒ Object (readonly)
Returns the value of attribute device.
87 88 89 |
# File 'lib/esphome/entity.rb', line 87 def device @device end |
#disabled_by_default ⇒ Object (readonly)
Returns the value of attribute disabled_by_default.
87 88 89 |
# File 'lib/esphome/entity.rb', line 87 def disabled_by_default @disabled_by_default end |
#entity_category ⇒ Object (readonly)
Returns the value of attribute entity_category.
87 88 89 |
# File 'lib/esphome/entity.rb', line 87 def entity_category @entity_category end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
87 88 89 |
# File 'lib/esphome/entity.rb', line 87 def icon @icon end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
87 88 89 |
# File 'lib/esphome/entity.rb', line 87 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
87 88 89 |
# File 'lib/esphome/entity.rb', line 87 def name @name end |
#object_id_ ⇒ Object (readonly)
Returns the value of attribute object_id_.
87 88 89 |
# File 'lib/esphome/entity.rb', line 87 def object_id_ @object_id_ end |
Instance Method Details
#inspect ⇒ String
107 108 109 110 111 112 113 114 115 |
# File 'lib/esphome/entity.rb', line 107 def inspect vars = inspection_vars.filter_map do |var| val = __send__(var) next if hideable?(var, val) "#{var}=#{val.inspect}" end "#<#{self.class.name} #{vars.join(", ")}>" end |