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

Constants inherited from Resource

Resource::AuthenticationError

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)


7
8
9
# File 'lib/fritzbox/smarthome/lightbulb.rb', line 7

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