2021-08-03 19:05:55 +02:00
|
|
|
from jarvis.skills import SkillRegistering, Skill
|
|
|
|
from jarvis.skills.decorators import intent_file_handler
|
2021-08-03 12:19:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
class WeatherSkill(Skill, metaclass=SkillRegistering):
|
2021-08-03 19:05:55 +02:00
|
|
|
def __init__(self, data=dict):
|
2021-08-03 12:19:34 +02:00
|
|
|
super().__init__("WeatherSkill", data)
|
|
|
|
|
2021-08-12 13:47:00 +02:00
|
|
|
# TODO: implement the entire skill with various provides (meteoswiss/meteofrance/openweather/etc)
|
|
|
|
|
2021-08-03 19:05:55 +02:00
|
|
|
@intent_file_handler("handle_weather.intent", "HandleWeatherIntent")
|
|
|
|
def handle_weather(self, data):
|
2021-08-03 12:19:34 +02:00
|
|
|
pass
|
|
|
|
|
2021-08-03 21:31:22 +02:00
|
|
|
@intent_file_handler("handle_temperature.intent", "HandleTemperatureIntent")
|
|
|
|
def handle_temperature(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_is_it_hot.intent", "HandleIsItHotIntent")
|
2021-08-07 16:34:44 +02:00
|
|
|
def handle_is_it_hot(self, data):
|
2021-08-03 21:31:22 +02:00
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_is_it_cold.intent", "HandleIsItColdIntent")
|
2021-08-07 16:34:44 +02:00
|
|
|
def handle_is_it_cold(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_is_it_windy.intent", "HandleIsItWindyIntent")
|
|
|
|
def handle_windy(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_is_it_snowing.intent", "HandleIsItSnowingIntent")
|
|
|
|
def handle_snowning(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_is_it_clear.intent", "HandleIsItClearIntent")
|
|
|
|
def handle_is_it_clear(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_is_it_cloudy.intent", "HandleIsItCloudyIntent")
|
|
|
|
def handle_is_it_cloudy(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_is_it_foggy.intent", "HandleIsItFoggyIntent")
|
|
|
|
def handle_is_it_foggy(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_is_it_raining.intent", "HandleIsItRainingIntent")
|
|
|
|
def handle_is_it_raining(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_do_i_need_an_umbrella.intent", "HandleNeedUmbrellaIntent")
|
|
|
|
def handle_need_umbrella(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_is_it_storming.intent", "HandleIsItStormingIntent")
|
|
|
|
def handle_need_storming(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_is_it_humid.intent", "HandleIsItHumidIntent")
|
|
|
|
def handle_is_it_humid(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_when_raining.intent", "HandleWhenRainingIntent")
|
|
|
|
def handle_when_raining(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_sunrise.intent", "HandleSunriseIntent")
|
|
|
|
def handle_sunrise(self, data):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@intent_file_handler("handle_sunset.intent", "HandleSunsetIntent")
|
|
|
|
def handle_sunset(self, data):
|
2021-08-03 21:31:22 +02:00
|
|
|
pass
|
|
|
|
|
2021-08-03 12:19:34 +02:00
|
|
|
|
|
|
|
def create_skill(data):
|
|
|
|
return WeatherSkill(data)
|