Skip to content

Commit

Permalink
Merge pull request #77 from elwombatto/master
Browse files Browse the repository at this point in the history
Add support for Shelly Plus 1 Mini
  • Loading branch information
hakana authored Nov 1, 2023
2 parents 6848438 + 53483d7 commit e5ff745
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ This library was created for Shelly Plugins for Home Assistant and Telldus Tells

### Plus devices
- Shelly Plus 1
- Shelly Plus 1 Mini
- Shelly Plus 1PM
- Shelly Plus 2
- Shelly Plus 2PM
Expand Down
5 changes: 5 additions & 0 deletions pyShelly/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ def setup_devices(self):
self.rpc = True
self._add_device(Relay(self, 0))
self._add_device(Switch(self, 0))
#Shelly Plus 1 Mini
elif self.type == 'ShellyPlus1Mini':
self.rpc = True
self._add_device(Switch(self,0))
self._add_device(Relay(self, 0))
#Shelly Plus 1PM
elif self.type == 'ShellyPlus1PM':
self.rpc = True
Expand Down
5 changes: 3 additions & 2 deletions pyShelly/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,12 @@
'SHSW-L': {'name': "Shelly 1L", 'mqtt':'shelly1l'},
'SHMOS-01': {'name': "Shelly Motion", 'mqtt':'shellymotionsensor'},
'ShellyPlus1': {'name':"Shelly Plus 1", 'mqtt':'shellyplus1'},
'ShellyPlus1PM': {'name':"Shelly Plus 1PM", 'mqtt':'shellyplus1pm'},
'ShellyPlus1PMMini': {'name':"Shelly Plus 1PM Mini", 'mqtt':'shelly1pmmini'},
'ShellyPlus1PM': {'name':"Shelly Plus 1PM", 'mqtt':'shellyplus1pm'},
'ShellyPlus2': {'name':"Shelly Plus 2", 'mqtt':'shellyplus2'},
'ShellyPlus2PM': {'name':"Shelly Plus 2PM", 'mqtt':'shellyplus2pm'},
'ShellyPlusPlugS': {'name':"Shelly Plus Plug S", 'mqtt':'shellyplusplugs'},
'ShellyPlus1Mini': {'name': "Shelly Plus 1 Mini", 'mqtt': 'shelly1mini'},
'ShellyPlus1PMMini': {'name':"Shelly Plus 1PM Mini", 'mqtt':'shelly1pmmini'},
'ShellyPro1': {'name':"Shelly Pro 1", 'mqtt':'shellypro1'},
'ShellyPro1PM': {'name':"Shelly Pro 1PM", 'mqtt':'shellypro1pm'},
'ShellyPro2': {'name':"Shelly Pro 2", 'mqtt':'shellypro2'},
Expand Down

0 comments on commit e5ff745

Please sign in to comment.