Local modification

This commit is contained in:
Martin Bauer 2022-10-02 12:40:42 +02:00
parent 42f0701c0b
commit a67c6078c5
3 changed files with 22 additions and 8 deletions

View File

@ -43,5 +43,15 @@
"cinttypes": "cpp", "cinttypes": "cpp",
"utility": "cpp", "utility": "cpp",
"typeinfo": "cpp" "typeinfo": "cpp"
} },
"vsmqtt.brokerProfiles": [
{
"name": "homeassistant",
"host": "homeassistant",
"port": 1883,
"username": "musicmouse",
"clientId": "vsmqtt_client",
"password": "KNLEFLZF94yA6Zhj141",
}
]
} }

View File

@ -69,6 +69,7 @@ class MusicMouseState:
def led_ring_effect(self, effect_cfg): def led_ring_effect(self, effect_cfg):
self.current_led_ring_effect = effect_cfg self.current_led_ring_effect = effect_cfg
self.protocol.led_ring_effect(effect_cfg) self.protocol.led_ring_effect(effect_cfg)
self.protocol.shelve_led_effect(effect_cfg)
def button_leds(self, brightness): def button_leds(self, brightness):
assert 0 <= brightness <= 1 assert 0 <= brightness <= 1
@ -191,11 +192,12 @@ class Controller:
'rgb_color': [255, 74, 254] 'rgb_color': [255, 74, 254]
}, },
} }
hass_service(self.hass, hass_service(
"light", self.hass,
"turn_on", "light",
entity_id="light.kinderzimmer_fluter", "turn_on",
**colors[message.touch_button]) entity_id=["light.kinderzimmer_fluter", "light.music_mouse_regal_licht"],
**colors[message.touch_button])
elif isinstance(message, TouchButtonRelease): elif isinstance(message, TouchButtonRelease):
figure = self.mmstate.active_figure figure = self.mmstate.active_figure

View File

@ -74,8 +74,10 @@ class ShelveLightMqtt:
eff = EffectSwipeAndChange() eff = EffectSwipeAndChange()
eff.swipe.secondary_color = current_color eff.swipe.secondary_color = current_color
eff.swipe.primary_color = self._last_color eff.swipe.primary_color = self._last_color
eff.swipe.bell_curve_width_in_leds = 5 eff.swipe.bell_curve_width_in_leds = 10
eff.swipe.swipe_speed = 180 eff.swipe.transition_width = 30
eff.swipe.start_position = 0
eff.swipe.swipe_speed = 260
eff.change.color1 = current_color eff.change.color1 = current_color
eff.change.color2 = self._last_color eff.change.color2 = self._last_color
elif s['effect'] == "twocolor": elif s['effect'] == "twocolor":