Class: Fritzbox::Smarthome::Lightbulb

Inherits:
Actor show all
Includes:
Properties::SimpleOnOff
Defined in:
lib/fritzbox/smarthome/lightbulb.rb

Constant Summary

Constants inherited from Actor

Actor::ResourceNotFound

Instance Attribute Summary

Attributes inherited from Actor

#ain, #group_members, #id, #manufacturer, #name, #present, #type

Class Method Summary collapse

Methods included from Properties::SimpleOnOff

#active?, #toggle!

Methods inherited from Actor

all, #assign_from_api, find_by!, new_from_api, #reload

Methods inherited from Resource

get, parse

Class Method Details

.match?(data) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/fritzbox/smarthome/lightbulb.rb', line 10

def match?(data)
  data.fetch('@productname', '') =~ /FRITZ!DECT 5\d{2}/i
end