My padatious entity files are being ignored. Help!

I am writing a skill to turn some lights on/off.

My intent file contains the line:

(switch | turn) the {{name}} light {{state}}
(switch | turn) {{name}} light {{state}}
(switch | turn) {{name}} {{state}}

I have a file called state.entity:


I also have a file called name.entity:


My skill includes the code:

def handle_lights_shelly(self, message):
name =‘name’)
state =‘state’)

If I say “turn the lounge light red”, the variable state contains “red”. Likewise, if I say “turn bathroom light on”, the variable name contains “bathroom”. Why is Mycroft ignoring my entity files?

Seems like I need to register the entity files in my initiaze(), using the self.register_entity_file API. Now it works as intended.

1 Like

Hey thanks for flagging this - the entity file registration was completely missing from the documentation!!!